Skip to content

Files

Represents a file repository: stored files that are identified by their IDs.

Remarks

The repository of standalone files is $Files. The main tasks are:

  • Add files from text, Base64 content or HTML, and read their content.
  • Copy, rename, replace, delete, hash, compress and extract the text of files.
  • Transfer files to and from a remote server over FTP, FTPS, SFTP or HTTP with FileTransferOptions.

Methods that add files return a FileInfo; store its ID in the process data to show the file on a form.

Capabilities

Content Operations

File Operations

  • Files.Copy: Creates a new copy of the file.
  • Files.Delete: Deletes the specified file from the repository.
  • Files.Download: Downloads a file from a remote environment, stores it in the repository, and returns the created FileInfo.
  • Files.Rename: Renames or moves a file on a remote environment.
  • Files.Replace: Replaces the contents of a file with the contents of another file.
  • Files.Upload: Uploads the specified file to a remote environment.

Directory Operations

  • Files.GetDir: Lists the contents of a directory from a remote environment.
  • Files.GetDir2: Lists a directory from a remote environment with additional information.
  • Files.MakeDir: Creates a new directory on a remote environment.
  • Files.Remove: Removes a file from a remote environment.
  • Files.RemoveDir: Removes a directory from a remote environment.

Metadata

  • Files.Hash: Returns the hash of the specified file.

Archive Operations

  • Files.UnZip: Extracts the files inside an archive file into the database and returns an array containing file information.
  • Files.Zip: Creates a Zip archive of the specified files.