System.IOUtils.TPath.GetExtension
Delphi
class function GetExtension(const FileName: string): string; static;
C++
static System::UnicodeString __fastcall GetExtension(const System::UnicodeString FileName);
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
function | public | System.IOUtils.pas System.IOUtils.hpp |
System.IOUtils | TPath |
Description
Extracts the extension part of a file name.
GetExtension extracts the extension part of the given file name. The resulting string also includes the dot that separates the extension from the path. If FileName has no extension, the resulting string is empty. The following table lists the parameters expected by this method.
Name | Meaning |
---|---|
FileName |
The file name from which the extension is extracted. |
Note: GetExtension raises an exception if the given file name contains invalid characters.
See Also
Code Examples