Expands a file name into a fully-qualified file name.
function FileExpand(Dest, Name: PChar): PChar;
Expands the file name in Name into a fully qualified file name. The resulting name is converted to uppercase and consists of:
- a drive letter
- a colon
- a root-relative directory path
- a file name
Embedded '.' and '..' directory references are removed, and all name and extension components are truncated to 8 and 3 characters, respectively. The returned value is Dest. Dest and Name can refer to the same location.
Assuming that the current drive and directory is C:\SOURCE\PAS, the following FileExpand calls would produce these values:
FileExpand(S, 'test.pas') = 'C:\SOURCE\PAS\TEST.PAS'
FileExpand(S, '..\*.TPW') = 'C:\SOURCE\*.TPW'
FileExpand(S, 'c:\bin\turbo.exe') = 'C:\BIN\TURBO.EXE'
The FileSplit function can be used to split the result of FileExpand into a drive/directory string, a file-name string, and an extension string.