[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 109

function ExpandFileNameUTF8(

  const FileName: string;

  BaseDir: string = ''

):string;

Arguments

FileName

  

File name for the operation

BaseDir

  

Base directory for the operation

Function result

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.

The latest version of this document can be found at lazarus-ccr.sourceforge.net.