setFilePermissions()
Sets the permissions for a file.
Synopsis
int setFilePermissions( string filename, int permissions);
Parameters
Parameter | Meaning |
---|---|
filename | The file path. The relative path is relative to the project directory. An absolute path can be given. |
permissions |
A bit-or combination of the following constants:
Note: On windows the permissions FILE_EXECUTE_OWNER, FILE_EXECUTE_GROUP and FILE_EXECUTE_OTHER cannot be set. |
Return value
The function will fail with a -1 return code when it is not possible to modify the file permissions (e.g. no right, file does not exist).
Errors
A wrong number of arguments will throw an exception.
Description
Sets the permissions for a file.
Assignment
File functions
Availability
CTRL