[Overview][Constants][Types][Procedures and functions][Variables][Index] Reference for unit 'LazFileUtils' (#lazutils)

ExpandFileNameUTF8

Expands the values in FileName and BaseDir to an absolute file name.

Declaration

Source position: lazfileutils.pas line 113

function ExpandFileNameUTF8(

  const FileName: string;

  BaseDir: string = ''

):string;

Arguments

FileName

  

File name examined in the function.

BaseDir

  

Base directory used to resolve a relative path.

Function result

The file name with an absolute path.

Description

ExpandFileNameUTF8 is a String function which expands the UTF-8-encoded values in FileName and BaseDir to an absolute file name. It changes all directory separator characters to the one appropriate for the system.

If an empty string ('') is passed in Filename, it is expanded to the current directory using GetCurrentDirUTF8. When FileName contains the tilde character (~), it is converted to the path to the home directory for the user using the HOME environment variable. Relative paths in FileName are resolved by calling ResolveDots.

See also

GetCurrentDirUTF8

  

Gets the name for the current directory.

ResolveDots

  

Resolves relative path references and removes duplicate path delimiters.


Version 3.2 Generated 2024-02-25 Home