System.IOUtils.TPath.GetFileName
Delphi
class function GetFileName(const FileName: string): string; inline; static;
C++
static System::UnicodeString __fastcall GetFileName(const System::UnicodeString FileName);
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
function | public | System.IOUtils.pas System.IOUtils.hpp |
System.IOUtils | TPath |
Description
Extracts and returns the name and extension parts of a file name specified in FileName
.
GetFileName extracts the name and extension parts of the file name given in FileName
. The resulting string consists of the characters of FileName
, starting with the first character after the colon or backslash that separates the path information from the file name and extension. The resulting string is equal to FileName
if FileName
contains no drive and directory parts.
FileName
The file name from which the name and extension are extracted.
Note: GetFileName raises an exception if the given
FileName
contains invalid characters.