[Overview][Constants][Types][Classes][Procedures and functions][Index] |
Gets the directory where the current program is located.
Source position: fileutil.pas line 59
function ProgramDirectory: string; |
Path to the directory where the current program is located.
ProgramDirectory is a String function which gets the path to the directory where the current program is located.
ProgramDirectory calls ParamStrUTF8 to get the command line and arguments used to start the current process. If the initial argument (the executable name) does not include a path to the file, the PATH environment variable was used to locate and start the process. SearchFileInPath is called to search each of the directory paths included in the PATH environment variable.
ProgramDirectory calls GetPhysicalFilename to resolve a symbolic link in the path to the executable. ExpandFileNameUTF8 is called to expand drive letters or relative path references in the return value.
The return value is an empty string if the executable was not located on local file system.
|
Searches for a file name in a given path using the specified base path and options. |
|
|
Converts the specified command line parameter to a UTF-8-encoded string. |
|
|
Returns the value of a system environment variable. |
|
|
Gets the physical file name for a symbolic link on the local file system. |
|
|
Expands the values in FileName and BaseDir to an absolute file name. |
Version 3.2 | Generated 2024-02-25 | Home |