Splits a file name into its three components.
function FileSplit(Path, Dir, Name, Ext: PChar): Word
Splits the file name specified by Path into its three components:
- Dir is set to the drive and directory path with any leading and
- Name is set to the file name
- Ext is set to the extension with a preceding period
If a component string parameter is nil, the corresponding part of the path is not stored. If the path does not contain a given component, the returned component string is empty. The maximum string lengths returned in Dir, Name, and Ext are defined by the fsDirectory, fsFileName, and fsExtension constants.
The returned value is a combination of the fcDirectory, fcFileName, and fcExtension bit masks, indicating which components were present in the path. If the name or extension contains any wildcard characters (symbol * or ?), the fcWildcards flag is set in the returned value.