Codeunit 419 "File Management"
Base Application · System.IO
Across versions
- BC23-26present
- BC271 procedures added
- BC28-30unchanged
Neighbourhood 106 connected objects and pages
Base Application · System.IO · BC23-30 · source at ea08af5e · facts from BC29
Events published
OnAfterGetToFilterTextSetOutExt(FileName: Text; var OutExt: Text)(integration)OnAfterDownloadHandler(var ToFolder: Text; ToFileName: Text; FromFileName: Text; var Downloaded: Boolean)(integration)OnBeforeBlobExport(var TempBlob: Codeunit "Temp Blob"; Name: Text; CommonDialog: Boolean; var IsHandled: Boolean; var Result: Text)(integration)OnBeforeBlobExportWithEncoding(var TempBlob: Codeunit "Temp Blob"; Name: Text; CommonDialog: Boolean; Encoding: TextEncoding; var Result: Text; var IsHandled: Boolean)(integration)OnBeforeDownloadHandler(var ToFolder: Text; ToFileName: Text; FromFileName: Text; var IsHandled: Boolean; var Downloaded: Boolean)(integration)OnBeforeUploadFileWithFilter(var ServerFileName: Text; WindowTitle: Text[50]; ClientFileName: Text; FileFilter: Text; ExtFilter: Text; var IsHandled: Boolean)(integration)OnBeforeDownloadFromStreamHandler(var ToFolder: Text; ToFileName: Text; FromInStream: InStream; var IsHandled: Boolean)(integration)
Procedures
BLOBImport(var TempBlob: Codeunit "Temp Blob"; Name: Text): TextBLOBImportWithFilter(var TempBlob: Codeunit "Temp Blob"; DialogCaption: Text; Name: Text; FileFilter: Text; ExtFilter: Text): TextBLOBExportWithEncoding(var TempBlob: Codeunit "Temp Blob"; Name: Text; CommonDialog: Boolean; Encoding: TextEncoding): TextBLOBExport(var TempBlob: Codeunit "Temp Blob"; Name: Text; CommonDialog: Boolean): TextServerTempFileName(FileExtension: Text): TextDownloadTempFile(ServerFileName: Text): TextUploadFile(WindowTitle: Text[50]; ClientFileName: Text): TextUploadFileWithFilter(WindowTitle: Text[50]; ClientFileName: Text; FileFilter: Text; ExtFilter: Text): TextMagicpath(): TextDownloadHandler(FromFile: Text; DialogTitle: Text; ToFolder: Text; ToFilter: Text; ToFile: Text): BooleanDownloadFromStreamHandler(FromInStream: InStream; DialogTitle: Text; ToFolder: Text; ToFilter: Text; ToFile: Text): BooleanCopyServerFile(SourceFileName: Text; TargetFileName: Text; Overwrite: Boolean)ServerFileExists(FilePath: Text): BooleanDeleteServerFile(FilePath: Text): BooleanServerDirectoryExists(DirectoryPath: Text): BooleanServerCreateDirectory(DirectoryPath: Text)ServerCreateTempSubDirectory(): TextServerRemoveDirectory(DirectoryPath: Text; Recursive: Boolean)GetFileName(FilePath: Text): TextGetSafeFileName(FileName: Text): TextGetPathWithSafeFileName(InFilePath: Text): TextGetFileNameWithoutExtension(FilePath: Text): TextHasExtension(FilePath: Text): BooleanGetFileNameMimeType(FileName: Text): TextGetDirectoryName(FileName: Text): TextGetServerDirectoryFilesList(var NameValueBuffer: Record "Name/Value Buffer"; DirectoryPath: Text)GetServerDirectoryFilesListInclSubDirs(var TempNameValueBuffer: Record "Name/Value Buffer" temporary; DirectoryPath: Text)GetServerFileProperties(FullFileName: Text; var ModifyDate: Date; var ModifyTime: Time; var Size: BigInteger)CombinePath(BasePath: Text; Suffix: Text): TextBLOBImportFromServerFile(var TempBlob: Codeunit "Temp Blob"; FilePath: Text)BLOBExportToServerFile(var TempBlob: Codeunit "Temp Blob"; FilePath: Text)InstreamExportToServerFile(Instream: InStream; FileExt: Text): TextTempBlobToServerFile(var TempBlob: Codeunit "Temp Blob"; FileExt: Text): Text[250]+ BC27 (internal)CreateAndWriteToServerFile(FileContent: Text; FileExt: Text): TextGetToFilterText(FilterString: Text; FileName: Text): TextGetExtension(Name: Text): TextIsValidFileName(FileName: Text): BooleanValidateFileExtension(FilePath: Text; ValidExtensions: Text)CreateFileNameWithExtension(FileNameWithoutExtension: Text; Extension: Text): TextAnsi2SystemEncoding(Destination: OutStream; Source: InStream)Ansi2SystemEncodingTxt(Destination: OutStream; Source: Text)StripNotsupportChrInFileName(InText: Text): TextExportImage(ImagetPath: Text; ToFile: Text)IsClientDirectoryEmpty(Path: Text): BooleanIsServerDirectoryEmpty(Path: Text): BooleanGetFileContents(FilePath: Text): Text: Gets the file contents as text from the file path provided in UTF8 text encoding.GetFileContents(FilePath: Text; Encoding: TextEncoding): Text: Gets the file contents as text from the file path provided in the requested text encoding.IsAllowedPath(Path: Text; SkipError: Boolean): BooleanAppendFileNameWithIndex(OriginalFileName: Text; AppendIndex: Integer): Text
Plus 2 local procedures.
Triggers
OnRun
Calls
From the extracted call graph of BC29 (graphify-al on the snapshot checkout): calls whose target is known from a declared type or an Object::"Name" argument. Interface dispatch and calls through events are not counted, so the list is not complete.
- Codeunit 4100 “Temp Blob” (6 calls:
BLOBExport → CreateInStream,BLOBExportToServerFile → CreateInStream,BLOBExportWithEncoding → CreateInStream, …) - Codeunit 1299 “Web Request Helper” (1 call:
IsAllowedPath → IsHttpUrl) - Codeunit 457 “Environment Information” (1 call:
IsAllowedPath → IsSaaS)
Called by
- Codeunit 8614 “Config. XML Exchange” (19 calls:
DecompressPackage → ServerTempFileName,ExportPackageXML → DownloadHandler,ExportPackageXML → GetDirectoryName, …) - Table 5062 “Attachment” (17 calls:
ExportAttachmentToClientFile → DeleteServerFile,ExportAttachmentToClientFile → Magicpath,ExportAttachmentToClientFile → ServerTempFileName, …) - Codeunit 8800 “Custom Layout Reporting” (15 calls:
AddFileToClientZip → ServerTempFileName,GenerateFileName → AppendFileNameWithIndex,GenerateFileName → CombinePath, …) - Table 77 “Report Selections” (15 calls:
DoSaveReportAsHTMLInTempBlob → BLOBExportToServerFile,DoSaveReportAsHTMLInTempBlob → BLOBImportFromServerFile,DoSaveReportAsHTMLInTempBlob → ServerTempFileName, …) - Table 370 “Excel Buffer” (13 calls:
CreateBook → IsAllowedPath,CreateBook → ServerTempFileName,GetFriendlyFilename → StripNotsupportChrInFileName, …) - Codeunit 5052 “AttachmentManagement” (9 calls:
DeliverEmailWithAttachmentViaExchange → DeleteServerFile,DeliverHTMLEmailViaExchange → DeleteServerFile,DeliverHTMLEmailViaExchange → ServerTempFileName, …) - Codeunit 1652 “Add-in Manifest Management” (7 calls:
DownloadManifestToClient → CopyServerFile,DownloadManifestToClient → DownloadHandler,DownloadMultipleManifestsToClient → DownloadFromStreamHandler, …) - Codeunit 5069 “Word Template Interactions” (7 calls:
ExecuteMerge → DeleteServerFile,ExecuteMerge → ServerTempFileName,Merge → DownloadFromStreamHandler, …) - Codeunit 5503 “Graph Mgt - Attachment Buffer” (7 calls:
FileNameToNameAndExtension → GetExtension,FileNameToNameAndExtension → GetFileNameWithoutExtension,InsertFromTempAttachmentEntityBufferToDocumentAttachment → GetExtension, …) - Codeunit 8610 “Questionnaire Management” (7 calls:
CreateConfigQuestionnaireXMLFile → ServerTempFileName,CreateSchemaFile → ServerTempFileName,ExportQuestionnaireAsXML → DownloadHandler, …) - Codeunit 6952 “Exp. Attach. Buffer Handler” (6 calls:
PropagateInsertAttachment → GetExtension,PropagateInsertAttachment → GetFileNameWithoutExtension,PropagateInsertAttachment → IsValidFileName, …) - Report 29 “Export Acc. Sched. to Excel” (6 calls:
SetUseExistingTemplate → CreateFileNameWithExtension,SetUseExistingTemplate → InstreamExportToServerFile,UploadClientFile → GetFileName, …) - Table 1173 “Document Attachment” (6 calls:
Export → BLOBExport,InsertAttachment → GetExtension,InsertAttachment → GetFileNameWithoutExtension, …) - Table 130400 “CAL Test Suite” (6 calls:
ExportTestSuiteResult → BLOBExport,ExportTestSuiteResult → ServerTempFileName,ExportTestSuiteSetup → BLOBExport, …) - Codeunit 1292 “Trace” (5 calls:
LogStreamToTempFile → BLOBExportToServerFile,LogStreamToTempFile → ServerTempFileName,LogTextToTempFile → ServerTempFileName, …) - Codeunit 130404 “CAL Test Project Mgt.” (5 calls:
Export → DownloadHandler,Export → IsAllowedPath,Export → ServerTempFileName, …) - Codeunit 1919 “MigrationQB Data Reader” (5 calls:
UnzipFile → GetDirectoryName,UnzipFile → GetServerDirectoryFilesListInclSubDirs,UnzipFile → ServerCreateTempSubDirectory, …) - Codeunit 9170 “Conf./Personalization Mgt.” (5 calls:
DownloadProfileConfigurationPackage → DeleteServerFile,DownloadProfileConfigurationPackage → DownloadHandler,DownloadProfileConfigurationPackage → ServerTempFileName, …) - Table 1235 “XML Buffer” (5 calls:
Download → DeleteServerFile,Download → DownloadHandler,Download → ServerTempFileName, …) - Codeunit 20113 “AMC Bank Exp. CT Hndl” (4 calls:
DecodePaymentData → BLOBImportFromServerFile,DecodePaymentData → IsAllowedPath,DecodePaymentData → ServerTempFileName, …) - Codeunit 20114 “AMC Bank Imp.STMT. Hndl” (4 calls:
EncodeBankStatementFile → BLOBExportToServerFile,EncodeBankStatementFile → IsAllowedPath,EncodeBankStatementFile → ServerTempFileName, …) - Codeunit 2020 “Image Analysis Management” (4 calls:
SetBlob → BLOBExportToServerFile,SetBlob → ServerTempFileName,SetImagePath → IsAllowedPath, …) - Codeunit 452 “Report Distribution Management” (4 calls:
CreateOrAppendZipFile → GetFileNameWithoutExtension,DownloadPdfOnClient → DownloadTempFile,SaveFileOnClient → BLOBExport, …) - Codeunit 8618 “Config. Excel Exchange” (4 calls:
BuildDataSetForPackageTable → ServerTempFileName,ExportExcel → BLOBExport,ExportExcel → BLOBExportToServerFile, …) - Codeunit 9660 “Report Layouts Impl.” (4 calls:
CreateLayoutMime → GetExtension,ExportReportLayout → BLOBExport,ExportReportLayout → BLOBExportWithEncoding, …) - Report 88 “VAT- VIES Declaration Disk” (4 calls:
OnPostReport → DeleteServerFile,OnPostReport → DownloadHandler,OnPostReport → GetToFilterText, …) - Table 9650 “Custom Report Layout” (4 calls:
ExportReportLayout → BLOBExport,ExportSchema → BLOBExport,ImportReportLayout → BLOBImportWithFilter, …) - Codeunit 134 “Import Attachment - Inc. Doc.” (3 calls:
SaveDocumentAttachment → GetExtension,SaveDocumentAttachment → GetFileNameWithoutExtension,UploadFile → BLOBImportWithFilter) - Codeunit 1410 “Doc. Exch. Service Mgt.” (3 calls:
ExtractAdditionalAttachment → GetExtension,ExtractAdditionalAttachment → IsAllowedPath,ExtractAdditionalAttachment → ServerTempFileName) - Codeunit 1630 “Office Management” (3 calls:
AttachDocument → GetExtension,AttachDocument → ServerTempFileName,GetContent → BLOBImportFromServerFile) - Codeunit 1806 “Excel Data Migrator” (3 calls:
ImportExcelData → UploadFile,ImportExcelDataByFileName → ValidateFileExtension,ImportExcelDataStream → GetToFilterText) - Codeunit 431 “IC Outbox Export” (3 calls:
AddBatchProcessingArtifact → BLOBImportFromServerFile,DownloadBatchFiles → DownloadFromStreamHandler,SendToExternalPartner → DownloadTempFile) - Codeunit 6223 “OpenXML Management” (3 calls:
CreateSchemaConnection → GetFileName,ExtractXMLSchema → IsAllowedPath,ExtractXMLSchema → ServerTempFileName) - Codeunit 8361 “Financial Report Export Job” (3 calls:
ExportExcel → CreateFileNameWithExtension,ExportPackageSchedule → CreateFileNameWithExtension,ExportPdf → CreateFileNameWithExtension) - Codeunit 9610 “XSD Parser” (3 calls:
GetSchemaLocation → CombinePath,GetSchemaLocation → GetDirectoryName,ParseSchemaReferenceDefinition → GetFileName) - Table 130 “Incoming Document” (3 calls:
AddAttachmentFromServerFile → GetExtension,AddAttachmentFromStream → GetFileNameWithoutExtension,AddXmlAttachmentFromXmlText → GetFileNameWithoutExtension) - Table 31 “Item Picture Buffer” (3 calls:
LoadZIPFile → GetExtension,LoadZIPFile → GetFileName,LoadZIPFile → GetFileNameWithoutExtension) - Table 9600 “XML Schema” (3 calls:
ExportSchema → BLOBExport,LoadSchema → BLOBImport,LoadSchema → GetFileName) - Codeunit 1181 “Prvacy Data Mgmt Excel” (2 calls:
OnRun → ServerFileExists,OnRun → ServerTempFileName) - Codeunit 1259 “Certificate Management” (2 calls:
UploadAndVerifyCert → BLOBImportWithFilter,UploadAndVerifyCert → GetFileName) - Codeunit 1676 “MS - Quickbooks Payroll Import” (2 calls:
ImportGLTransactionsFromIIFFile → UploadFile,OnCreateSampleFile → BLOBExport) - Codeunit 1916 “MigrationQB Mgt” (2 calls:
ImportQBData → ServerFileExists,ImportQBData → UploadFileWithFilter) - Codeunit 1918 “MigrationQB Data Loader” (2 calls:
CleanupFiles → DeleteServerFile,CleanupFiles → ServerRemoveDirectory) - Codeunit 6224 “XML DOM Management” (2 calls:
LoadXMLDocumentFromFile → IsAllowedPath,LoadXMLDocumentFromFileWithXmlReaderSettings → IsAllowedPath) - Codeunit 8619 “Config. Pckg. Compression Mgt.” (2 calls:
ProcessGZip → GetFileName,ProcessGZip → IsValidFileName) - Codeunit 9025 “Small Business Report Catalog” (2 calls:
RunDetailTrialBalanceReport → Magicpath,RunDetailTrialBalanceReport → ServerTempFileName) - Codeunit 9510 “Document Service Management” (2 calls:
GetSafeDocumentServiceFolderName → GetSafeFileName,OnUploadDocument → GetSafeFileName) - Page 346 “Item Picture” (2 calls:
ImportFromDevice → DeleteServerFile,ImportFromDevice → UploadFile) - Page 409 “Item Variant Picture” (2 calls:
ImportFromDevice → DeleteServerFile,ImportFromDevice → UploadFile) - Page 9183 “Generic Chart Setup” (2 calls:
ExportChartDefinition → BLOBExport,ImportChartDefinition → BLOBImport) - and 53 more: data/code/graph/29/calls.json
Ask your agent
Procedure bodies are not stored here (D10). The call sections above are our own, per object, from the BC29 call graph. For a procedure body or the calls of one procedure, ask bc-code-atlas (external, by Stefan Maron, MIT; default corpus w1-28), which the bc-observatory plugin connects: bcatlas_resolve_node(object_type: "codeunit", object_name: "File Management"), then bcatlas_get_procedure_body or bcatlas_get_neighbors on the returned id.