• Tutorials
  • Api Documentation
  • Download
  • Credits
Show / Hide Table of Contents
  • AutoCheck.Core
    • Output
    • Output.Log
    • Output.Style
    • Output.Type
    • Script
    • Script.ExecutionMode
    • Utils
    • Utils.OS
  • AutoCheck.Core.Connectors
    • Atom
    • Base
    • Compressed
    • Css
    • Csv
    • CsvDocument
    • Dmoj
    • GDrive
    • Html
    • Math
    • Odoo
    • Operator
    • PlainText
    • PlainText.PlainTextDocument
    • Postgres
    • Rss
    • Shell
    • TextStream
    • Xml
    • Xml.XmlNodeType
  • AutoCheck.Core.CopyDetectors
    • Base
    • Base.Mode
    • Css
    • Html
    • PlainText
    • PlainText.File
    • SourceCode
    • SqlLog
    • Xml
  • AutoCheck.Core.Events
    • LogUpdateEventArgs
    • StatusUpdateEventArgs
    • StatusUpdateEventArgs.ExecutionEvent
  • AutoCheck.Core.Exceptions
    • ArgumentInvalidException
    • ArgumentNotFoundException
    • ConfigFileMissingException
    • ConnectionInvalidException
    • ConnectorInvalidException
    • ConnectorNotFoundException
    • DocumentInvalidException
    • DownloadFailedException
    • ItemNotFoundException
    • PorpertyNotFoundException
    • QueryInvalidException
    • RegexInvalidException
    • ResultMismatchException
    • ScriptInvalidException
    • ScriptNotFoundException
    • StyleInvalidException
    • StyleNotAppliedException
    • StyleNotFoundException
    • TableInconsistencyException
    • VariableInvalidException
    • VariableNotFoundException
  • Google.DiffMatchPatch
    • Diff
    • DiffMatchPatch
    • Operation
    • Patch

Class GDrive

Allows in/out operations and/or data validations with a GDrive instance.

Inheritance
System.Object
AutoCheck.Core.Connector
GDrive
Implements
System.IDisposable
Inherited Members
AutoCheck.Core.Connector.CurrentOS
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: AutoCheck.Core.Connectors
Assembly: AutoCheck.dll
Syntax
public class GDrive : Connector, IDisposable

Constructors

| Improve this Doc View Source

GDrive(String, String)

Declaration
public GDrive(string clientSecretJson, string userName)
Parameters
Type Name Description
System.String clientSecretJson
System.String userName

Properties

| Improve this Doc View Source

Drive

Declaration
public DriveService Drive { get; }
Property Value
Type Description
Google.Apis.Drive.v3.DriveService

Methods

| Improve this Doc View Source

CopyFile(File, String, String)

Copy an external Google Drive file into the main account.

Declaration
public void CopyFile(File file, string remoteFilePath, string remoteFileName = null)
Parameters
Type Name Description
Google.Apis.Drive.v3.Data.File file

The Google Drive API file to copy.

System.String remoteFilePath

Remote file path

System.String remoteFileName

Remote file name (extenssion and/or name will be infered from source if not provided).

| Improve this Doc View Source

CopyFile(String, String, String)

Copy an external Google Drive file into the main account.

Declaration
public void CopyFile(string fileID, string remoteFilePath, string remoteFileName = null)
Parameters
Type Name Description
System.String fileID

The Google Drive API file's ID to copy.

System.String remoteFilePath

Remote file path

System.String remoteFileName

Remote file name (extenssion and/or name will be infered from source if not provided).

| Improve this Doc View Source

CopyFile(Uri, String, String)

Copy an external Google Drive file into the main account.

Declaration
public void CopyFile(Uri uri, string remoteFilePath, string remoteFileName = null)
Parameters
Type Name Description
System.Uri uri

The Google Drive API file URI to copy.

System.String remoteFilePath

Remote file path

System.String remoteFileName

Remote file name (extenssion and/or name will be infered from source if not provided).

| Improve this Doc View Source

CountFiles(String, Boolean)

Returns how many folders has been found within the given path.

Declaration
public int CountFiles(string path, bool recursive = true)
Parameters
Type Name Description
System.String path

Path where the folders will be searched into.

System.Boolean recursive

Recursive deep search.

Returns
Type Description
System.Int32

The amount of folders.

| Improve this Doc View Source

CountFolders(String, Boolean)

Returns how many folders has been found within the given path.

Declaration
public int CountFolders(string path, bool recursive = true)
Parameters
Type Name Description
System.String path

Path where the folders will be searched into.

System.Boolean recursive

Recursive deep search.

Returns
Type Description
System.Int32

The amount of folders.

| Improve this Doc View Source

CreateFile(String, String, String)

Uploads a local file to a remote Google Drive folder.

Declaration
public void CreateFile(string localFilePath, string remoteFilePath, string remoteFileName = null)
Parameters
Type Name Description
System.String localFilePath

Local file path

System.String remoteFilePath

Remote file path (will be created if not exists).

System.String remoteFileName

Remote file name (extenssion and/or name will be infered from source if not provided).

| Improve this Doc View Source

CreateFolder(String, String)

Creates the specified folder

Declaration
public File CreateFolder(string path, string folder)
Parameters
Type Name Description
System.String path

Path where the folder will be created into.

System.String folder

The folder to create (all needed subfolders will be created also).

Returns
Type Description
Google.Apis.Drive.v3.Data.File
| Improve this Doc View Source

DeleteFile(String, String)

Removes a remote file

Declaration
public void DeleteFile(string remoteFilePath, string remoteFileName)
Parameters
Type Name Description
System.String remoteFilePath

Remote file path .

System.String remoteFileName

Remote file name (extenssion and/or name will be infered from source if not provided).

| Improve this Doc View Source

DeleteFolder(String, String)

Removes a remote folder

Declaration
public void DeleteFolder(string path, string folder)
Parameters
Type Name Description
System.String path

Path where the folder will be searched into.

System.String folder

The folder to search.

| Improve this Doc View Source

Dispose()

Disposes the object releasing its unmanaged properties.

Declaration
public override void Dispose()
Overrides
AutoCheck.Core.Connector.Dispose()
| Improve this Doc View Source

Download(File, String)

Declaration
public string Download(File file, string savePath)
Parameters
Type Name Description
Google.Apis.Drive.v3.Data.File file
System.String savePath
Returns
Type Description
System.String
| Improve this Doc View Source

Download(String, String)

Declaration
public string Download(string fileID, string savePath)
Parameters
Type Name Description
System.String fileID
System.String savePath
Returns
Type Description
System.String
| Improve this Doc View Source

Download(Uri, String)

Declaration
public string Download(Uri uri, string savePath)
Parameters
Type Name Description
System.Uri uri
System.String savePath
Returns
Type Description
System.String
| Improve this Doc View Source

GetFile(String, String, Boolean)

Returns the selected file

Declaration
public File GetFile(string path, string file, bool recursive = true)
Parameters
Type Name Description
System.String path

Path where the file will be searched into.

System.String file

The file to search.

System.Boolean recursive

Recursive deep search.

Returns
Type Description
Google.Apis.Drive.v3.Data.File

The selected file.

| Improve this Doc View Source

GetFolder(String, String, Boolean)

Returns the selected folder

Declaration
public File GetFolder(string path, string folder, bool recursive = true)
Parameters
Type Name Description
System.String path

Path where the folder will be searched into.

System.String folder

The folder to search.

System.Boolean recursive

Recursive deep search.

Returns
Type Description
Google.Apis.Drive.v3.Data.File

The selected folder.

Implements

System.IDisposable
  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX