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

DirectoryIsWritable

Indicates if the specified directory name is writable

Declaration

Source position: lazfileutils.pas line 41

function DirectoryIsWritable(

  const DirectoryName: string

):Boolean;

Arguments

DirectoryName

  

Directory name to examine in the function

Function result

True if the specified directory is writable

Description

DirectoryIsWritable is a Boolean function used to determine if the specified directory name is writable in the file system. The path name in DirectoryName must already exist on the local file system. The return value is False if a directory with the specified name does not exist.

The return value is True when a file can be added, deleted, or modified in the specified path. To get the return value, DirectoryIsWritable creates a temporary file in DirectoryName, adds content to it, and deletes the temporary file. DirectoryIsWritable calls the FileCreateUTF8, FileWrite, FileClose, and DeleteFileUTF8 routines to perform the file operations. The return value is True when FileWrite completes successfully.

See also

FileCreateUTF8

FileWrite

FileClose

DeleteFileUTF8

  

Deletes the specified file name

InvalidateFileStateCache

  

Signals the OnInvalidateFileStateCache event handler

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