Sets the attributes of a file on UNIX or Linux.
FileSetAccessMode(filepath
,mode
)
FileCopy, FileDelete, FileExists, FileMove
ColdFusion 8: Added this function.
Parameter |
Description |
---|---|
filepath |
An absolute path to the file on the server. |
mode |
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. |
The following example sets the access mode of a file so that only the owner can read the file.
<h3>FileSetAccessMode Example</h3> <cfscript> FileSetAccessMode("test1.txt", "004"); </cfscript>