[Overview][Constants][Types][Procedures and functions][Variables][Index] |
Creates the directories specified in Dir if they do not already exist.
Source position: lazfileutils.pas line 128
function ForceDirectoriesUTF8( |
const Dir: string |
):Boolean; |
Dir |
|
Device and path information to examine the function. |
True when directories exist or are successfully created in the function.
ForceDirectoriesUTF8 is a Boolean function which creates any missing directories specified in the UTF-8-encoded Dir argument. Dir can contain notation using the following conventions:
ForceDirectoriesUTF8 calls ExtractFileDrive to get the disk or UNC host+share name used in Dir. No actions are performed if the return value from ExtractFileDrive is an empty device identifier, or the device does not have a valid root directory on the local file system. The return value is set to False.
ForceDirectories raises an EInOutError exception with the message in SCannotCreateEmptyDir when Dir contains an empty string ('').
ForceDirectoriesUTF8 converts path delimiters specified in Dir to the value required for the platform using ForcePathDelims (when needed).
Each directory found in Dir is checked using DirectoryExistsUTF8. CreateDirUTF8 is called if a directory does not already exist, and may exit with a return value of False if directory creation is not successful.
The return value is True if all directories in the path information already exist, or are successfully created in the function.
var bOk: Boolean; // ... bOk := ForceDirectoriesUTF8('\\capcom\telemetry\eva\bio'); bOk := ForceDirectoriesUTF8('//capcom/telemetry/eva/gps'); bOk := ForceDirectoriesUTF8('/home/jsmith/capcom/telemetry/eva/camera'); bOk := ForceDirectoriesUTF8('C:\capcom\telemetry\eva\era');
|
Determine if the specified path exists on the local file system. |
|
|
Creates a new directory with the specified name. |
|
|
Performs path delimiter substitutions for the specified file name. |
|
|
Creates the specified directory if it does not already exist. |
|
Version 3.2 | Generated 2024-02-25 | Home |