Codeunit 419 File Management

Base Application, System.IO

76 procedures

ProcedureVersions
BLOBImport(var TempBlob: Codeunit "Temp Blob"; Name: Text): Text17-29
BLOBImportWithFilter(var TempBlob: Codeunit "Temp Blob"; DialogCaption: Text; Name: Text; FileFilter: Text; ExtFilter: Text): Text17-29
BLOBExportWithEncoding(var TempBlob: Codeunit "Temp Blob"; Name: Text; CommonDialog: Boolean; Encoding: TextEncoding): Text17-29
BLOBExport(var TempBlob: Codeunit "Temp Blob"; Name: Text; CommonDialog: Boolean): Text17-29
ServerTempFileName(FileExtension: Text): Text17-29
ClientTempFileName(FileExtension: Text): Textgone after 19
Pending, tag 17.3, obsolete since 17: IsLocalFileSystemAccessible always returns false and this procedure will always throw an error.
CreateClientTempSubDirectory(): Textgone after 19
Pending, tag 17.3, obsolete since 17: IsLocalFileSystemAccessible always returns false and this procedure will always throw an error.
DownloadTempFile(ServerFileName: Text): Text17-29
UploadFileSilent(ClientFilePath: Text): Textgone after 19
Pending, tag 17.3, obsolete since 17: IsLocalFileSystemAccessible always returns false and this procedure will always throw an error.
UploadFileSilentToServerPath(ClientFilePath: Text; ServerFilePath: Text): Textgone after 19
Pending, tag 17.3, obsolete since 17: IsLocalFileSystemAccessible always returns false and this procedure will always throw an error.
UploadFileToServer(ClientFilePath: Text): Textgone after 19
Pending, tag 17.3, obsolete since 17: IsLocalFileSystemAccessible always returns false, please use the UploadFile procedure.
UploadFile(WindowTitle: Text[50]; ClientFileName: Text): Text17-29
UploadFileWithFilter(WindowTitle: Text[50]; ClientFileName: Text; FileFilter: Text; ExtFilter: Text): Text17-29
Magicpath(): Text17-29
DownloadHandler(FromFile: Text; DialogTitle: Text; ToFolder: Text; ToFilter: Text; ToFile: Text): Boolean17-29
DownloadFromStreamHandler(FromInStream: InStream; DialogTitle: Text; ToFolder: Text; ToFilter: Text; ToFile: Text): Boolean17-29
DownloadToFile(ServerFileName: Text; ClientFileName: Text)gone after 19
Pending, tag 17.3, obsolete since 17: IsLocalFileSystemAccessible always returns false, please use the DownloadHandler(ServerFileName, '', '', '', ClientFileName) procedure.
AppendAllTextToClientFile(ServerFileName: Text; ClientFileName: Text)gone after 19
Pending, tag 17.3, obsolete since 17: IsLocalFileSystemAccessible always returns false and this procedure will always throw an error.
MoveAndRenameClientFile(OldFilePath: Text; NewFileName: Text; NewSubDirectoryName: Text): Textgone after 19
Pending, tag 17.3, obsolete since 17: IsLocalFileSystemAccessible always returns false and this procedure will always throw an error.
CreateClientFile(FilePathName: Text)gone after 19
Pending, tag 17.3, obsolete since 17: IsLocalFileSystemAccessible always returns false and this procedure will always throw an error.
DeleteClientFile(FilePath: Text): Booleangone after 19
Pending, tag 17.3, obsolete since 17: IsLocalFileSystemAccessible always returns false and this procedure will always throw an error.
CopyClientFile(SourceFileName: Text; DestFileName: Text; OverWrite: Boolean)gone after 19
Pending, tag 17.3, obsolete since 17: IsLocalFileSystemAccessible always returns false and this procedure will always throw an error.
ClientFileExists(FilePath: Text): Booleangone after 19
Pending, tag 17.3, obsolete since 17: IsLocalFileSystemAccessible always returns false, this procedure will always return false. This procedure will be removed.
ClientDirectoryExists(DirectoryPath: Text): Booleangone after 19
Pending, tag 17.3, obsolete since 17: IsLocalFileSystemAccessible always returns false, this procedure will always return false. This procedure will be removed.
CreateClientDirectory(DirectoryPath: Text)gone after 19
Pending, tag 17.3, obsolete since 17: IsLocalFileSystemAccessible always returns false and this procedure will always throw an error.
DeleteClientDirectory(DirectoryPath: Text)gone after 19
Pending, tag 17.3, obsolete since 17: IsLocalFileSystemAccessible always returns false and this procedure will always throw an error.
UploadClientDirectorySilent(DirectoryPath: Text; FileExtensionFilter: Text; IncludeSubDirectories: Boolean): Textgone after 19
Pending, tag 17.3, obsolete since 17: IsLocalFileSystemAccessible always returns false and this procedure will always throw an error.
MoveFile(SourceFileName: Text; TargetFileName: Text)gone after 19
Pending, tag 17.3, obsolete since 17: IsLocalFileSystemAccessible always returns false and this procedure will always throw an error.
CopyServerFile(SourceFileName: Text; TargetFileName: Text; Overwrite: Boolean)17-29
ServerFileExists(FilePath: Text): Boolean17-29
DeleteServerFile(FilePath: Text): Boolean17-29
ServerDirectoryExists(DirectoryPath: Text): Boolean17-29
ServerCreateDirectory(DirectoryPath: Text)17-29
ServerCreateTempSubDirectory(): Text17-29
ServerRemoveDirectory(DirectoryPath: Text; Recursive: Boolean)17-29
GetFileName(FilePath: Text): Text17-29
GetSafeFileName(FileName: Text): Text17-29
GetFileNameWithoutExtension(FilePath: Text): Text17-29
HasExtension(FilePath: Text): Boolean17-29
GetFileNameMimeType(FileName: Text): Text17-29
GetDirectoryName(FileName: Text): Text17-29
GetClientDirectoryFilesList(var NameValueBuffer: Record "Name/Value Buffer"; DirectoryPath: Text)gone after 19
Pending, tag 17.3, obsolete since 17: IsLocalFileSystemAccessible always returns false and this procedure will always throw an error.
GetServerDirectoryFilesList(var NameValueBuffer: Record "Name/Value Buffer"; DirectoryPath: Text)17-29
GetServerDirectoryFilesListInclSubDirs(var TempNameValueBuffer: Record "Name/Value Buffer" temporary; DirectoryPath: Text)17-29
GetClientFileProperties(FullFileName: Text; var ModifyDate: Date; var ModifyTime: Time; var Size: BigInteger): Booleangone after 19
Pending, tag 17.3, obsolete since 17: IsLocalFileSystemAccessible always returns false and this procedure will always throw an error.
GetServerFileProperties(FullFileName: Text; var ModifyDate: Date; var ModifyTime: Time; var Size: BigInteger): Boolean17-29
CombinePath(BasePath: Text; Suffix: Text): Text17-29
BLOBImportFromServerFile(var TempBlob: Codeunit "Temp Blob"; FilePath: Text)17-29
BLOBExportToServerFile(var TempBlob: Codeunit "Temp Blob"; FilePath: Text)17-29
InstreamExportToServerFile(Instream: InStream; FileExt: Text): Text17-29
CreateAndWriteToServerFile(FileContent: Text; FileExt: Text): Text17-29
GetToFilterText(FilterString: Text; FileName: Text): Text17-29
GetExtension(Name: Text): Text17-29
OpenFileDialog(WindowTitle: Text[50]; DefaultFileName: Text; FilterString: Text): Textgone after 19
Pending, tag 17.3, obsolete since 17: The local file system is no longer accessible. Please use the UploadFile procedure.
SaveFileDialog(WindowTitle: Text[50]; DefaultFileName: Text; FilterString: Text): Textgone after 19
Pending, tag 17.3, obsolete since 17: The local file system is no longer accessible. The procedure will always return an empty string. This procdure will be removed.
SelectFolderDialog(WindowTitle: Text; var SelectedFolder: Text): Booleangone after 19
Pending, tag 17.3, obsolete since 17: The local file system is no longer accessible and this procedure will always return false.
IsLocalFileSystemAccessible(): Booleangone after 19
Pending, tag 17.3, obsolete since 17: The windows client type has been retired. This procedure will always return false.
IsValidFileName(FileName: Text): Boolean17-29
ValidateFileExtension(FilePath: Text; ValidExtensions: Text)17-29
CreateFileNameWithExtension(FileNameWithoutExtension: Text; Extension: Text): Text17-29
Ansi2SystemEncoding(Destination: OutStream; Source: InStream)17-29
Ansi2SystemEncodingTxt(Destination: OutStream; Source: Text)17-29
BrowseForFolderDialog(WindowTitle: Text[50]; DefaultFolderName: Text; ShowNewFolderButton: Boolean): Textgone after 19
Pending, tag 17.3, obsolete since 17: The procedure uses .NET which does not function on non-Windows client types.
StripNotsupportChrInFileName(InText: Text): Text17-29
ExportImage(ImagetPath: Text; ToFile: Text)17-29
IsClientDirectoryEmpty(Path: Text): Boolean17-29
IsServerDirectoryEmpty(Path: Text): Boolean17-29
GetFileContent(FilePath: Text): Textgone after 19
Pending, tag 17.0, obsolete since 17: GetFileContent will be replaced with GetFileContents. This currently uses InStream.ReadText() which only returns the stream contents up to the first line break character.
GetFileContents(FilePath: Text): Text17-29
GetFileContents(FilePath: Text; Encoding: TextEncoding): Text17-29
IsAllowedPath(Path: Text; SkipError: Boolean): Boolean17-29
SaveStreamToFileServerFolder(var TempBlob: Codeunit "Temp Blob"; Name: Text; FileExtension: Text; InnerFolder: Text): Textgone after 19
Pending, tag 17.0, obsolete since 17: Use the DownloadFromStream function to save the content of a stream locally.
MoveAndRenameServerFile(AbsolutePathToFile: Text; RelativePathFolder: Text; NewNameFile: Text)gone after 19
Pending, tag 17.0, obsolete since 17: Server files should not be edited directly on the server. Instead, use the DownloadFromStream function to get a local copy of the file on the server.
AppendFileNameWithIndex(OriginalFileName: Text; AppendIndex: Integer): Textnew in 18
GetPathWithSafeFileName(InFilePath: Text): Textnew in 20
internal TempBlobToServerFile(var TempBlob: Codeunit "Temp Blob"; FileExt: Text): Text[250]new in 27