Skip to content

Files

Represents an instance of a file repository. The global file repository can be accessed with the $Files instance.

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.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.