FileSetAccessMode()
Sets the attributes of an on-disk file on UNIX or Linux. This function does not work with in-memory files.
FileSetAccessMode( file=any, mode=string );
Returns: void
| Argument | Description |
|---|---|
|
file
any,
required
|
edit
file path Alias: filePath, source, path |
|
mode
string,
required
|
edit
A three-digit value, in which each digit specifies the file access for individuals and groups:
Each digit of this code sets permissions for the appropriate individual or group:
You use the sums of these numbers to indicate combinations of the permissions:
For example, 400 specifies that only the owner can read the file; 004 specifies that anyone can read the file. |
Examples
edit fileSetAccessMode("sample_test.txt", "004");
See also
- File handling
- FileModeToSymbolic()
- Search Issue Tracker open_in_new
- Search Lucee Test Cases open_in_new (good for further, detailed examples)