Lasso Soft Inc. > Home

[ file->chmod ]

Method

[file->chmod] changes the unix file permissions of a file. The permissions may be expressed in either octal or decimal notation.

  • Syntax
file object->chmod(octal notation)
file object->chmod(decimal notation)
Examples
  • Beginner

To change the Unix file permissons of a file:

Use the [file->chmod] tag. The following example changes the Unix file system permissions of a file to -rwxrwxr-x (read, write, and execute permissions for the file owner, read, write, and execute permissions for the file group, and read and execute permissions for all other system users).

Code

local(f = file('/path/to/file.txt'))
#f->chmod('0775') // using octal notation
#f->chmod(509) // using decimal notation

Recent Comments

No Comments found

Please note that periodically LassoSoft will go through the notes and may incorporate information from them into the documentation. Any submission here gives LassoSoft a non-exclusive license and will be made available in various formats to the Lasso community.

LassoSoft Inc. > Home

 

 

©LassoSoft Inc 2015 | Web Development by Treefrog Inc | PrivacyLegal terms and Shipping | Contact LassoSoft