System.IOUtils.TPath.GetDirectoryName

From XE2 API Documentation
Jump to: navigation, search

Delphi

class function GetDirectoryName(FileName: string): string; static;

C++

static System::UnicodeString __fastcall GetDirectoryName(System::UnicodeString FileName);

Properties

Type Visibility Source Unit Parent
function public
System.IOUtils.pas
System.IOUtils.hpp
System.IOUtils TPath

Description

Extracts drive and directory parts of a file name.

GetDirectoryName extracts the drive and directory parts of the given file name. The resulting string is empty if FileName contains no drive or directory parts. The following table lists the parameters expected by this method.

Name Meaning

FileName

The file name from which the drive and directory are extracted.

Note: GetDirectoryName raises an exception if the given file name contains invalid characters.

See Also

Code Examples