System.IOUtils.TPath.GetExtension

From XE2 API Documentation
Jump to: navigation, search

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 is empty if FileName has no extension. 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