System.SysUtils.ExtractFileDir

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function ExtractFileDir(const FileName: string): string;

C++

extern DELPHI_PACKAGE System::UnicodeString __fastcall ExtractFileDir(const System::UnicodeString FileName)/* overload */;

Properties

Type Visibility Source Unit Parent
function public
System.SysUtils.pas
System.SysUtils.hpp
System.SysUtils System.SysUtils

Description

Extracts the drive and directory parts from FileName.

The resulting string is a directory name suitable for passing to the CreateDir, GetCurrentDir, RemoveDir, and SetCurrentDir functions. This string is empty if FileName contains no drive and directory parts.

Note: This function works for multi-byte character systems (MBCS).

See Also