[Overview][Constants][Types][Procedures and functions][Variables] |
Expand a relative path to an absolute path
Source position: dosh.inc line 117
function FExpand( |
const path: PathStr |
):PathStr; |
FExpand takes its argument and expands it to a complete filename, i.e. a filename starting from the root directory of the current drive, prepended with the drive-letter or volume name (when supported).
Remark: | On case sensitive file systems (such as unix and linux), the resulting name is left as it is, otherwise it is converted to uppercase. |
Program Example5; uses Dos; { Program to demonstrate the Exec and DosExitCode function. } begin {$IFDEF Unix} WriteLn('Executing /bin/ls -la'); Exec('/bin/ls','-la'); {$ELSE} WriteLn('Executing Dir'); Exec(GetEnv('COMSPEC'),'/C dir'); {$ENDIF} WriteLn('Program returned with ExitCode ',Lo(DosExitCode)); end.