Table of Contents

TTMSFNCCloudStorageServices Class

Unified storage component that exposes a single API over multiple cloud storage providers, selecting the active provider at runtime.

API unit family: TMSFNCCloudStorageServices Inherits from: TTMSFNCCustomComponent

Syntax

TTMSFNCCloudStorageServices = class(TTMSFNCCustomComponent)

Properties

Name Description
Authentication Configures OAuth client and token endpoint settings used by the active provider.
CloudFiles Returns the resumable upload file collection of the active provider.
Drive Returns the drive item collection of the active storage provider.
LogFilename Gets or sets the file name used for provider request logging.
Logging Enables or disables provider request logging.
PersistTokens Configures how OAuth tokens are persisted between sessions.
PromiseCreateFolder Returns the folder item produced by the most recent create-folder promise.
PromiseFolderList Returns the item collection produced by the most recent folder-list promise.
PromiseSearch Returns the item collection produced by the most recent search promise.
Service Selects the cloud storage provider used by the facade.
Storage Returns the active provider-specific storage instance.

Methods

Name Description
BeginSync Starts synchronization on the active storage provider.
ClearTokens Clears persisted access and refresh tokens for the active provider.
Connect Connects to the selected storage provider using the configured authentication settings.
CreateFolder Creates a folder below the specified provider folder.
CreateFolderPromise Starts an asynchronous folder creation request.
Delete Deletes a provider item.
Download Downloads a provider item to a local target file.
EndSync Ends synchronization on the active storage provider.
GetFileById Returns a storage item by provider-specific item identifier.
GetFolderList Returns the items in a provider folder.
GetFolderListHierarchical Returns a folder tree with child folders expanded recursively.
GetFolderListHierarchicalPromise Starts an asynchronous hierarchical folder-list request.
GetFolderListPromise Starts an asynchronous folder-list request.
LoadTokens Loads persisted OAuth tokens into the active provider.
MoveFile Moves an item to another provider folder.
MoveFileToRoot Moves an item to the provider root folder.
RenameFile Renames a provider item.
SaveTokens Saves OAuth tokens from the active provider to the configured token store.
Search Searches provider items by query text.
SearchListPromise Starts an asynchronous search request.
Upload Uploads a local file to a provider folder.
UploadResumableFile Starts a resumable upload for a prepared cloud file.

Events

Name Description
OnConnected Occurs after the active provider connects successfully.
OnCreateFolder Occurs when a create-folder request completes.
OnDeleteItem Occurs when a delete request completes.
OnDownloadFile Occurs when a download request completes.
OnGetFolderList Occurs when a folder-list request completes.
OnMoveFile Occurs when a move request completes.
OnRenameFile Occurs when a rename request completes.
OnRequestComplete Occurs when the active provider completes a request.
OnRequestProgress Occurs when the active provider reports request progress.
OnSearch Occurs when a search request completes.
OnUploadFile Occurs when an upload request completes.
OnUploadResumableFile Occurs when a resumable upload chunk completes.
OnUploadResumableFileFailed Occurs when a resumable upload fails.
OnUploadResumableFileFinished Occurs when a resumable upload finishes successfully.