Table of Contents

Interface "External File Storage Connector"

Namespace: System.ExternalFileStorage

A External File Storage Connector interface "used to create file accounts and handle external files."

Methods

ListFiles

Gets a List of Files stored on the provided account.

procedure ListFiles(AccountId: Guid, Path: Text, FilePaginationData: Codeunit "File Pagination Data", var TempFileAccountContent: Record "File Account Content" temporary)

Parameters

Name Type Description
AccountId Guid

The file account ID which is used to get the file.

Path Text

The file path to list.

FilePaginationData Codeunit System.ExternalFileStorage."File Pagination Data"

Defines the pagination data.

TempFileAccountContent Table System.ExternalFileStorage."File Account Content"

The file account ID which is used to get the file.

GetFile

Gets a file from the provided account.

procedure GetFile(AccountId: Guid, Path: Text, Stream: InStream)

Parameters

Name Type Description
AccountId Guid

The file account ID which is used to get the file.

Path Text

The file path inside the file account.

Stream InStream

The Stream were the file is read to.

CreateFile

Gets a file to the provided account.

procedure CreateFile(AccountId: Guid, Path: Text, Stream: InStream)

Parameters

Name Type Description
AccountId Guid

The file account ID which is used to send out the file.

Path Text

The file path inside the file account.

Stream InStream

The Stream were the file is read from.

CopyFile

Copies as file inside the provided account.

procedure CopyFile(AccountId: Guid, SourcePath: Text, TargetPath: Text)

Parameters

Name Type Description
AccountId Guid

The file account ID which is used to send out the file.

SourcePath Text

The source file path.

TargetPath Text

The target file path.

MoveFile

Move as file inside the provided account.

procedure MoveFile(AccountId: Guid, SourcePath: Text, TargetPath: Text)

Parameters

Name Type Description
AccountId Guid

The file account ID which is used to send out the file.

SourcePath Text

The source file path.

TargetPath Text

The target file path.

FileExists

Checks if a file exists on the provided account.

procedure FileExists(AccountId: Guid, Path: Text): Boolean

Parameters

Name Type Description
AccountId Guid

The file account ID which is used to send out the file.

Path Text

The file path inside the file account.

Returns

Type Description
Boolean

Returns true if the file exists

DeleteFile

Deletes a file exists on the provided account.

procedure DeleteFile(AccountId: Guid, Path: Text)

Parameters

Name Type Description
AccountId Guid

The file account ID which is used to send out the file.

Path Text

The file path inside the file account.

ListDirectories

Gets a List of Directories stored on the provided account.

procedure ListDirectories(AccountId: Guid, Path: Text, FilePaginationData: Codeunit "File Pagination Data", var TempFileAccountContent: Record "File Account Content" temporary)

Parameters

Name Type Description
AccountId Guid

The file account ID which is used to get the file.

Path Text

The file path to list.

FilePaginationData Codeunit System.ExternalFileStorage."File Pagination Data"

Defines the pagination data.

TempFileAccountContent Table System.ExternalFileStorage."File Account Content"

The file account ID which is used to get the file.

CreateDirectory

Creates a directory on the provided account.

procedure CreateDirectory(AccountId: Guid, Path: Text)

Parameters

Name Type Description
AccountId Guid

The file account ID which is used to send out the file.

Path Text

The directory path inside the file account.

DirectoryExists

Checks if a directory exists on the provided account.

procedure DirectoryExists(AccountId: Guid, Path: Text): Boolean

Parameters

Name Type Description
AccountId Guid

The file account ID which is used to send out the file.

Path Text

The directory path inside the file account.

Returns

Type Description
Boolean

Returns true if the directory exists

DeleteDirectory

Deletes a directory exists on the provided account.

procedure DeleteDirectory(AccountId: Guid, Path: Text)

Parameters

Name Type Description
AccountId Guid

The file account ID which is used to send out the file.

Path Text

The directory path inside the file account.

GetAccounts

Gets the file accounts registered for the connector.

procedure GetAccounts(var TempAccounts: Record "File Account" temporary)

Parameters

Name Type Description
TempAccounts Table System.ExternalFileStorage."File Account"

ShowAccountInformation

Shows the information for a file account.

procedure ShowAccountInformation(AccountId: Guid)

Parameters

Name Type Description
AccountId Guid

The ID of the file account

RegisterAccount

Registers a file account for the connector.

procedure RegisterAccount(var TempFileAccount: Record "File Account" temporary): Boolean

Parameters

Name Type Description
TempFileAccount Table System.ExternalFileStorage."File Account"

Returns

Type Description
Boolean

True if an account was registered.

Remarks

The out parameter must hold the account ID of the added account.

DeleteAccount

Deletes a file account for the connector.

procedure DeleteAccount(AccountId: Guid): Boolean

Parameters

Name Type Description
AccountId Guid

The ID of the file account

Returns

Type Description
Boolean

True if an account was deleted.

GetLogoAsBase64

Provides a custom logo for the connector that shows in the Setup File Account Guide.

procedure GetLogoAsBase64(): Text

Returns

Type Description
Text

Base64 encoded image.

Remarks

The recommended image size is 128x128.

GetDescription

Provides a more detailed description of the connector.

procedure GetDescription(): Text[250]

Returns

Type Description
Text[250]

A more detailed description of the connector.

See also