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

SetCurrentDirUTF8

Sets the current directory to the specified name.

Declaration

Source position: lazfileutils.pas line 125

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'

Version 3.2 Generated 2024-02-25 Home