[Overview][Constants][Types][Classes][Procedures and functions][Index] | Reference for unit 'FileUtil' (#lcl)

# DirectoryIsWritable

DirectoryIsWritable - checks if it is possible to write a file to the named directory

## Declaration

Source position: fileutil.pas line 74

`function DirectoryIsWritable(`
`const DirectoryName: String`
`):Boolean;`

## Arguments

`DirectoryName` |  | Name of the Directory for checking

## Function result

Returns True if successful in writing a temporary file to the named directory

## Description

DirectoryIsWritable - checks if it is possible to write a file to the named directory

Tries to create a text file within the named directory, and write to it. Returns True if it works, and False if it doesn't. Also raises an Exception on failure

## Errors

An Exception is raised on failure to create or write to the temporary file

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