Sign in Join
FPDoc Onlineexperiment

SetCurrentDirUTF8 function

In unit LazFileUtils

Sets the current directory to the specified name.

Declaration

pascal
function SetCurrentDirUTF8(const NewDir: string): Boolean

Arguments

NewDir

Directory name to use as the current directory.

Function result

True if the current directory was successfully changed to the new value.

Description

SetCurrentDirUTF8 is a Boolean function used to set the current directory in the local file system to the specified value.

For the Windows environment, UTFDecode is called to convert NewDir and passed to SetCurrentDirectoryW to set the current directory name. Windows CE raises an exception in SetCurrentDirUtf8; the concept of a current directory does not exist in Windows CE.

For UNIX-like environments, SetCurrentDir in SysUtils is used to set the current directory to the specified value.

The return value is True if the current directory is successfully changed to the new value.

Errors

TException
Raised for the Windows CE environment; exception message is: '[SetCurrentDirWide] The concept of the current directory doesn't exist in Windows CE'

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.