Codeunit 18122353 EOS004 IFileSystem Wrapper
Provides access to different types of file systems implemented via IFileSystem.
procedure Initialize(ifc: Interface "EOS004 IFileSystem")
Initializes a new instance. This must be called before any other method from this codeunit is called. This overload can be used if the underlying IFileSystem implementation does not require any configuration or has already been configured.
ifc Interface "EOS004 IFileSystem"
The IFileSystem interface to use.
procedure Initialize(ifc: Interface "EOS004 IFileSystem"; ServiceConfigCode: Code[20])
Initializes a new instance. This must be called before any other method from this codeunit is called.
ifc Interface "EOS004 IFileSystem"
The IFileSystem interface to use.
ServiceConfigCode Code[20]
The configuration for the IFileSystem.
procedure Initialize(ifc: Interface "EOS004 IFileSystem"; ServiceConfig: Record "EOS004 Service Config.")
Initializes a new instance. This must be called before any other method from this codeunit is called.
ifc Interface "EOS004 IFileSystem"
The IFileSystem interface to use.
ServiceConfig Record "EOS004 Service Config."
The configuration for the IFileSystem.
procedure UploadFile(path: Text; var TempBlob: codeunit "Temp Blob")
Uploads a file to the file system. This is a TryFunction.
path Text
The path to the folder where the file should be placed.
TempBlob codeunit "Temp Blob"
The contents of the file to be uploaded.
procedure NormalizeFolderDelimiter(Path: Text): Text
Normalizes the folder delimiter on a given path, if different delimiters are used.
Path Text
The path to be normalized.
Returns Text
procedure GetFolderDelimiter(Path: Text): Text
Returns the folder delimiter used on a given path.
Path Text
The path
Returns Text
The folder delimiter.
procedure GetParentPath(Path: Text): Text
Returns the parent path of a given path.
Path Text
The path.
Returns Text
The parent path. Will be an empty string if the path is the root or first element.
procedure GetChildName(Path: Text): Text
Returns the name of the last element (file or folder) of a path.
Path Text
The path.
Returns Text
The name of the last element (file or folder). Will be an empty string if the path is the root.
procedure FileExists(path: Text; var Exists: Boolean)
Checks if a file exists on the file system. This is a TryFunction.
path Text
The fully qualified path to the file.
Exists Boolean
Will contain true
if the file exists, false
otherwise.
procedure FolderExists(path: Text; var Exists: Boolean)
Checks if a folder exists on the file system. This is a TryFunction.
path Text
The fully qualified path to the folder.
Exists Boolean
Will contain true
if the file exists, false
otherwise.
procedure ReadFile(path: Text; var TempBlob: codeunit "Temp Blob")
Reads the contents of a file into the provided BLOB. This is a TryFunction.
path Text
The fully qualified path to the file.
TempBlob codeunit "Temp Blob"
Will contain the contents of the file.
procedure DeleteFile(path: Text)
Deletes a file from the file system. This is a TryFunction.
path Text
The fully qualified path to the file.
procedure RenameFile(oldPath: Text; newPath: Text)
Renames a file on the file system. This is a TryFunction.
oldPath Text
The fully qualified path to the file to be renamed.
newPath Text
The fully qualified path to the new file.
procedure CopyFile(fromPath: Text; toPath: Text)
Copies a file on the file system. This is a TryFunction.
fromPath Text
toPath Text
procedure MoveFile(fromPath: Text; toPath: Text)
Moves a file on the file system. This is a TryFunction.
fromPath Text
toPath Text
procedure GetFiles(path: Text; var TempEntries: Record "EOS004 AzFS Entry")
Returns a list of files in a fiven folder on the file system. This is a TryFunction.
path Text
The fully qualified path to the folder to be queried.
TempEntries Record "EOS004 AzFS Entry"
This will contain the found file system entries.
procedure GetFiles(path: Text; var TempEntries: Record "EOS004 AzFS Entry"; ClearBuffer: Boolean)
Returns a list of files in a fiven folder on the file system. This is a TryFunction.
path Text
The fully qualified path to the folder to be queried.
TempEntries Record "EOS004 AzFS Entry"
This will contain the found file system entries.
ClearBuffer Boolean
If true
, the buffer will be cleared before adding new entries.
procedure GetFileAttributes(path: Text; var Result: Dictionary of [Text, Text])
Returns the attributes of a file system entry. This is a TryFunction.
path Text
The fully qualified path to the file to be queried.
Result Dictionary[Text,Text]
This will contain all the attributes of the file from the file system. The actual attributes returned are specific to the IFileSystem implementation in use and may vary between implementations.
procedure CreateFolder(path: Text)
Creates a folder on the filesystem. This is a TryFunction.
path Text
The fully qualified path on the FileSystem.
procedure DeleteFolder(path: Text; force: Boolean)
Deletes an entire folder tree on the filesystem. This also recursively deletes children. This is a TryFunction.
path Text
The fully qualified path on the FileSystem.
force Boolean
procedure MoveFolder(fromPath: Text; toPath: Text)
Moves an entire folder tree on the filesystem. This is a TryFunction.
fromPath Text
The fully qualified path to the folder to be moved.
toPath Text
The fully qualified path to the new folder.
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.