RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
AnsiStrings.ExtractFileDrive Function

Extract drive part of filename.

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

ExtractFileDrive extracts the drive part of the given filename. For filenames with drive letters, the resulting AnsiString is '<drive>:'. For filenames with a UNC path, the resulting AnsiString is in the form '\\<servername>\<sharename>'. If the given path contains neither style of filename, the result is an empty AnsiString

 

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