RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
AnsiStrings.ExtractFilePath Function

Extract drive and directory parts of filename.

Pascal
function ExtractFilePath(const FileName: AnsiString): AnsiString; overload;
C++
AnsiString ExtractFilePath(const AnsiString FileName);

ExtractFilePath extracts the drive and directory parts of the given filename. The resulting AnsiString is the leftmost characters of FileName, up to and including the colon or backslash that separates the path information from the name and extension. The resulting AnsiString is empty if FileName contains no drive and directory parts. 

 

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!