DocumentFiles¶
Represents the files of a Document.
Remarks¶
In addition to the Files methods, which add files to the document, the collection can be read like an array: length returns the number of files, and files[index] or files[fileId] returns a FileInfo.
Examples¶
List the files of a document¶
1 2 3 4 5 | |
Capabilities¶
Properties¶
- DocumentFiles.length: Gets the number of files of the document.
Content Operations¶
- DocumentFiles.AddBase64: Adds a new file to the repository with Base64 encoded content and returns the created FileInfo.
- DocumentFiles.AddPDF: Adds a new PDF file to the repository with HTML content and returns the created FileInfo.
- DocumentFiles.AddString: Adds a new text file to the repository and returns the created FileInfo.
- DocumentFiles.ExtractText: Extracts the text content of a file.
- DocumentFiles.FromBase64: Converts the given Base64 encoded string to a string.
- DocumentFiles.Get: Returns the file information by its ID.
- DocumentFiles.GetBase64: Returns the content of the file as Base64 encoded.
- DocumentFiles.GetString: Returns the file content as a string.
- DocumentFiles.SetBase64: Updates the content of the file with the given ID.
- DocumentFiles.ToBase64: Converts the given string to a Base64 encoded string.
Methods¶
- DocumentFiles.AddFile: Copies a repository file into the document.
File Operations¶
- DocumentFiles.Copy: Creates a new copy of the file.
- DocumentFiles.Delete: Deletes the specified file from the repository.
- DocumentFiles.Download: Downloads a file from a remote environment, stores it in the repository, and returns the created FileInfo.
- DocumentFiles.Rename: Renames or moves a file on a remote environment.
- DocumentFiles.Replace: Replaces the contents of a file with the contents of another file.
- DocumentFiles.Upload: Uploads the specified file to a remote environment.
Directory Operations¶
- DocumentFiles.GetDir: Lists the contents of a directory from a remote environment.
- DocumentFiles.GetDir2: Lists a directory from a remote environment with additional information.
- DocumentFiles.MakeDir: Creates a new directory on a remote environment.
- DocumentFiles.Remove: Removes a file from a remote environment.
- DocumentFiles.RemoveDir: Removes a directory from a remote environment.
Metadata¶
- DocumentFiles.Hash: Returns the hash of the specified file.
Archive Operations¶
- DocumentFiles.UnZip: Extracts the files inside an archive file into the database and returns an array containing file information.
- DocumentFiles.Zip: Creates a Zip archive of the specified files.