GoogleDrive Component
Properties Methods Events Configuration Settings Errors
The GDrive component provides easy file and folder management.
Syntax
nsoftware.InCloudStorage.Googledrive
Remarks
GDrive allows quick and simple management of files and folders stored in Google Drive.
To upload a file, simply call UploadFile and specify the file you wish to upload. To list files and folders, call ListResources. Resources are described by the Resource* properties. Setting ResourceIndex selects a specific resource and allows you to inspect the related properties.
Call DownloadFile to download a file. Other file and folder management functions include CreateFolder, CopyResource, DeleteResource, MoveToTrash, RestoreFromTrash, UpdateResource, and more.
In addition you can modify permissions and child-parent relationships. Please see the Methods section of the documentation for a full list of supported methods.
This service supports authentication via OAuth 2.0. First, perform OAuth authentication using the OAuth component or
a separate process. Once complete you should have an authorization string which looks like:
Bearer ya29.AHES6ZSZEJzATdZYjeihDn5W-VrXSsxEZu5p0pclxGdKKQAssign this value to the Authorization property before attempting any operations. Consult the Google documentation for this particular service for more information about supported scope values and more details on OAuth authentication.
Property List
The following is the full list of the properties of the component with short descriptions. Click on the links for further details.
Authorization | OAuth 2.0 Authorization Token. |
ChangeMarker | A marker indicating what page of changes to return next. |
Changes | A collection of changes. |
ChildMarker | A marker when children are paged. |
Cookies | Collection of cookies. |
EncryptionAlgorithm | The encryption algorithm. |
EncryptionPassword | The encryption password. |
Firewall | A set of properties related to firewall access. |
Idle | The current status of the component. |
LocalFile | The location of the local file. |
LocalHost | The name of the local host or user-assigned IP interface through which connections are initiated or accepted. |
NextChangeMarker | A marking indicating what page of changes to return in the future. |
OtherHeaders | Other headers as determined by the user (optional). |
Overwrite | Determines if local files are overwritten. |
ParsedHeaders | Collection of headers returned from the last request. |
PermissionAllowFileDiscovery | Whether the permission allows the file to be discovered through search. |
PermissionCount | The number of permissions for the file. |
PermissionDomain | The domain to which the permission applies. |
PermissionEmail | The user or group to which the permission applies. |
PermissionId | The Id of the permission. |
PermissionIndex | Specifies the permission. |
PermissionMarker | A marker when permissions are paged. |
PermissionRole | The role specified for the permission. |
PermissionType | The set of users to which the permission applies. |
Proxy | A set of properties related to proxy access. |
QueryParams | Addtional query parameters to be included in the request. |
ResourceChildren | A collection of child file and folders. |
ResourceContentAccessible | Whether the file is accessible. |
ResourceCount | The number of files and folders. |
ResourceCreatedTime | The creation date of the file or folder. |
ResourceData | Holds the file data after downloading or sets the file data before uploading or updating. |
ResourceDescription | A short description of the file or folder. |
ResourceExtension | The extension of the file. |
ResourceId | The Id of the resource. |
ResourceIndex | Selects the file or folder. |
ResourceMarker | A marker when resources are paged. |
ResourceMD5Checksum | The MD5 checksum of the file. |
ResourceMIMEType | The MIME type of the file. |
ResourceModifiedTime | The modified date of the resource. |
ResourceName | The name of the file or folder. |
ResourceOriginalName | The original name of the file. |
ResourceOwner | The name of the resource's owner. |
ResourceOwnerEmail | The email address of the resource's owner. |
ResourceParents | A collection of parent folders. |
ResourceSize | The size of the file in bytes. |
ResourceStarred | Whether the resource is starred. |
ResourceTrashed | Whether the resource is in the trash. |
ResourceType | Indicates whether the current entry is a folder or a file. |
ResourceViewed | Whether the resource has been viewed. |
ResourceViewLink | A link for opening the file in a relevant Google editor or viewer in a browser. |
ResumeURL | The URL for the resumable upload. |
SSLAcceptServerCert | Instructs the component to unconditionally accept the server certificate that matches the supplied certificate. |
SSLCert | The certificate to be used during SSL negotiation. |
SSLServerCert | The server certificate for the last established connection. |
StartByte | The byte offset from which to start the upload or download. |
Timeout | A timeout for the component. |
UseResumableUpload | Whether to use resumable uploads. |
XChildren | Collection of child elements of the current element. |
XElement | The name of the current element. |
XParent | The parent of the current element. |
XPath | Provides a way to point to a specific element in the response. |
XSubTree | A snapshot of the current element in the document. |
XText | The text of the current element. |
Method List
The following is the full list of the methods of the component with short descriptions. Click on the links for further details.
AddChild | Adds a child file or folder to a parent folder. |
AddParent | Adds a parent folder for a file or folder. |
AddPermission | Adds a permission to the specified file or folder. |
AddQueryParam | Adds a query parameter to the QueryParams properties. |
Config | Sets or retrieves a configuration setting . |
CopyResource | Copies a file. |
CreateFolder | This method creates a new folder. |
DeleteChild | Deletes a child from a folder. |
DeleteParent | Deletes the parent from a file or folder. |
DeletePermission | Deletes the specified permission. |
DeleteResource | Deletes the specified file or folder permanently. |
DownloadFile | Downloads, and optionally converts, the currently selected file. |
GetCurrentChangeMarker | Get the most current change marker. |
GetResourceInfo | This method retrieves information about the file. |
GetUploadStatus | Get the status of a resumable upload session. |
Interrupt | Interrupt the current method. |
ListChanges | Lists changes for a user. |
ListChildren | Lists children of the current folder. |
ListParents | Lists the current file or folder parents. |
ListPermissions | Lists the permissions for the specified file or folder. |
ListResources | Lists the files and folders for the current user. |
MoveToTrash | Moves the selected file or folder to the trash. |
RestoreFromTrash | Restores a file or folder from trash. |
SetDownloadStream | Sets the stream to which the downloaded file will be written. |
SetUploadStream | Sets the stream from which data is read when uploading. |
UpdatePermission | Update the permissions on a file or folder. |
UpdateResource | Updates a file or folder. |
UploadFile | Uploads, and optionally converts, a new file. |
Event List
The following is the full list of the events fired by the component with short descriptions. Click on the links for further details.
ChangeList | This event fires once for each change when ListChanges is called. |
ChildList | Fires once for each child when calling ListChildren. |
Connected | Fired immediately after a connection completes (or fails). |
Disconnected | Fired when a connection is closed. |
EndTransfer | Fired when a document finishes transferring. |
Error | Information about errors during data delivery. |
FragmentComplete | This event fires after each fragment of a resumable upload is completed. |
Header | Fired every time a header line comes in. |
ParentList | This event fires once for each parent returned when calling ListParents. |
PermissionList | This event fires once for each permission returned when calling ListPermissions. |
ResourceList | Fires once for each resource when ListResources is called. |
SetCookie | Fired for every cookie set by the server. |
SSLServerAuthentication | Fired after the server presents its certificate to the client. |
SSLStatus | Shows the progress of the secure connection. |
StartTransfer | Fired when a document starts transferring (after the headers). |
Status | Fired when the HTTP status line is received from the server. |
Transfer | Fired while a document transfers (delivers document). |
Configuration Settings
The following is a list of configuration settings for the component with short descriptions. Click on the links for further details.
IncludeFiles | Whether files are included when calling ListResources. |
IncludeFolders | Whether folders are included when calling ListResources. |
IncludeFolderProperties | Whether Resource properties apply when calling CreateFolder. |
ListOnlyRootItems | Whether to list only resources in the root folder. |
MaxResults | Limits the number of results. |
EncryptionIV | The initialization vector to be used for encryption/decryption. |
EncryptionKey | The key to use during encryption/decryption. |
FragmentSize | The fragment size. |
DownloadTempFile | The temporary file used when downloading encrypted data. |
TempPath | The path to the directory where temporary files are created. |
DocsExportFormat | The file format to export Google Docs files as when downloading. |
DrawingsExportFormat | The file format to export Google Drawings files as when downloading. |
SheetsExportFormat | The file format to export Google Sheets files as when downloading. |
SlidesExportFormat | The file format to export Google Slides files as when downloading. |
NormalizedFileName | Filename constructed using currently selected resource's information. |
AcceptEncoding | Used to tell the server which types of content encodings the client supports. |
AllowHTTPCompression | This property enables HTTP compression for receiving data. |
AllowHTTPFallback | Whether HTTP/2 connections are permitted to fallback to HTTP/1.1. |
AllowNTLMFallback | Whether to allow fallback from Negotiate to NTLM when authenticating. |
Append | Whether to append data to LocalFile. |
Authorization | The Authorization string to be sent to the server. |
BytesTransferred | Contains the number of bytes transferred in the response data. |
EncodeURL | If set to true the URL will be encoded by the component. |
FollowRedirects | Determines what happens when the server issues a redirect. |
GetOn302Redirect | If set to true the component will perform a GET on the new location. |
HTTPVersion | The version of HTTP used by the component. |
HTTP2HeadersWithoutIndexing | HTTP2 headers that should not update the dynamic header table with incremental indexing. |
IfModifiedSince | A date determining the maximum age of the desired document. |
KeepAlive | Determines whether the HTTP connection is closed after completion of the request. |
LogLevel | The level of detail that is logged. |
MaxHeaders | Instructs component to save the amount of headers specified that are returned by the server after a Header event has been fired. |
MaxHTTPCookies | Instructs component to save the amount of cookies specified that are returned by the server when a SetCookie event is fired. |
MaxRedirectAttempts | Limits the number of redirects that are followed in a request. |
NegotiatedHTTPVersion | The negotiated HTTP version. |
OtherHeaders | Other headers as determined by the user (optional). |
ProxyAuthorization | The authorization string to be sent to the proxy server. |
ProxyAuthScheme | The authorization scheme to be used for the proxy. |
ProxyPassword | A password if authentication is to be used for the proxy. |
ProxyPort | Port for the proxy server (default 80). |
ProxyServer | Name or IP address of a proxy server (optional). |
ProxyUser | A user name if authentication is to be used for the proxy. |
TransferredData | The contents of the last response from the server. |
TransferredDataLimit | The maximum number of incoming bytes to be stored by the component. |
TransferredHeaders | The full set of headers as received from the server. |
UseChunkedEncoding | Enables or Disables HTTP chunked encoding for transfers. |
ChunkSize | Specifies the chunk size in bytes when using chunked encoding. |
UsePlatformHTTPClient | Whether or not to use the platform HTTP client. |
UserAgent | Information about the user agent (browser). |
KerberosSPN | The Service Principal Name for the Kerberos Domain Controller. |
ConnectionTimeout | Sets a separate timeout value for establishing a connection. |
FirewallAutoDetect | Tells the component whether or not to automatically detect and use firewall system settings, if available. |
FirewallHost | Name or IP address of firewall (optional). |
FirewallListener | If true, the component binds to a SOCKS firewall as a server (IPPort only). |
FirewallPassword | Password to be used if authentication is to be used when connecting through the firewall. |
FirewallPort | The TCP port for the FirewallHost;. |
FirewallType | Determines the type of firewall to connect through. |
FirewallUser | A user name if authentication is to be used connecting through a firewall. |
KeepAliveTime | The inactivity time in milliseconds before a TCP keep-alive packet is sent. |
KeepAliveInterval | The retry interval, in milliseconds, to be used when a TCP keep-alive packet is sent and no response is received. |
Linger | When set to True, connections are terminated gracefully. |
LingerTime | Time in seconds to have the connection linger. |
LocalHost | The name of the local host through which connections are initiated or accepted. |
LocalPort | The port in the local host where the component binds. |
MaxLineLength | The maximum amount of data to accumulate when no EOL is found. |
MaxTransferRate | The transfer rate limit in bytes per second. |
ProxyExceptionsList | A semicolon separated list of hosts and IPs to bypass when using a proxy. |
TCPKeepAlive | Determines whether or not the keep alive socket option is enabled. |
UseIPv6 | Whether to use IPv6. |
UseNTLMv2 | Whether to use NTLM V2. |
CloseStreamAfterTransfer | If true, the component will close the upload or download stream after the transfer. |
TcpNoDelay | Whether or not to delay when sending packets. |
CACertFilePaths | The paths to CA certificate files when using Mono on Unix/Linux. |
LogSSLPackets | Controls whether SSL packets are logged when using the internal security API. |
ReuseSSLSession | Determines if the SSL session is reused. |
SSLCipherStrength | The minimum cipher strength used for bulk encryption. |
SSLEnabledProtocols | Used to enable/disable the supported security protocols. |
SSLIncludeCertChain | Whether the entire certificate chain is included in the SSLServerAuthentication event. |
SSLProvider | The name of the security provider to use. |
SSLSecurityFlags | Flags that control certificate verification. |
SSLCACerts | A newline separated list of CA certificate to use during SSL client authentication. |
SSLEnabledCipherSuites | The cipher suite to be used in an SSL negotiation. |
TLS12SignatureAlgorithms | Defines the allowed TLS 1.2 signature algorithms when UseInternalSecurityAPI is True. |
TLS12SupportedGroups | The supported groups for ECC. |
TLS13KeyShareGroups | The groups for which to pregenerate key shares. |
TLS13SupportedGroups | The supported groups for (EC)DHE key exchange. |
TLS13SignatureAlgorithms | The allowed certificate signature algorithms. |
AbsoluteTimeout | Determines whether timeouts are inactivity timeouts or absolute timeouts. |
FirewallData | Used to send extra data to the firewall. |
InBufferSize | The size in bytes of the incoming queue of the socket. |
OutBufferSize | The size in bytes of the outgoing queue of the socket. |
GUIAvailable | Tells the component whether or not a message loop is available for processing events. |
UseBackgroundThread | Whether threads created by the component are background threads. |
UseInternalSecurityAPI | Tells the component whether or not to use the system security libraries or an internal implementation. |