System.AnsiStrings.ExtractFileDrive
Delphi
function ExtractFileDrive(const FileName: AnsiString): AnsiString;
C++
extern DELPHI_PACKAGE System::AnsiString __fastcall ExtractFileDrive(const System::AnsiString FileName)/* overload */;
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
function | public | System.AnsiStrings.pas System.AnsiStrings.hpp |
System.AnsiStrings | System.AnsiStrings |
Description
Extract drive part of 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.