RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
SysUtils.ExtractFileDir Function

Extracts the drive and directory parts from FileName.

Pascal
function ExtractFileDir(const FileName: string): string;
C++
AnsiString ExtractFileDir(const AnsiString FileName);

SysUtils

The resulting string is a directory name suitable for passing to the CreateDir, GetCurrentDir, RemoveDir, and SetCurrentDir functions. This string is empty if FileName contains no drive and directory parts.

Note: This function works for multi-byte character systems (MBCS).
 

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!