Difference between revisions of "GETPROT()"
From Lianjapedia
Yvonne.milne (Talk | contribs) (→See Also) |
|||
(2 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
==Purpose== | ==Purpose== | ||
Function to return current file-protection mask | Function to return current file-protection mask | ||
− | |||
==Syntax== | ==Syntax== | ||
GETPROT() | GETPROT() | ||
− | |||
==See Also== | ==See Also== | ||
− | + | [[GETGID()]], [[GETUID()]], [[SETPROT()]] | |
− | + | ||
==Description== | ==Description== | ||
− | Used to manipulate file protection masks, the GETPROT() function returns the current file protection mask which will be used when creating any new files. If the protection mask has not been changed with the SETPROT()function, the default protection mask is returned. The string returned by GETPROT() is known as the file protection mask | + | Used to manipulate file protection masks, the GETPROT() function returns the current file protection mask which will be used when creating any new files. If the protection mask has not been changed with the SETPROT()function, the default protection mask is returned. The string returned by GETPROT() is known as the file protection mask. The GETPROT() function always returns a character string in upper case. |
− | + | ||
==Example== | ==Example== | ||
Line 23: | Line 19: | ||
</code> | </code> | ||
− | |||
− | |||
− | |||
[[Category:Documentation]] | [[Category:Documentation]] | ||
[[Category:Functions]] | [[Category:Functions]] |
Latest revision as of 10:25, 9 February 2012
Contents
Purpose
Function to return current file-protection mask
Syntax
GETPROT()
See Also
Description
Used to manipulate file protection masks, the GETPROT() function returns the current file protection mask which will be used when creating any new files. If the protection mask has not been changed with the SETPROT()function, the default protection mask is returned. The string returned by GETPROT() is known as the file protection mask. The GETPROT() function always returns a character string in upper case.
Example
old_mask = getprot() setprot("S:RWED,O:RWED,G:RW,W:RW") pack setprot(old_mask)