Difference between revisions of "GETPROT()"

From Lianjapedia
Jump to: navigation, search
 
(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==
[[CREATE]], [[GETGID()]], [[GETUID()]], [[MODIFY STRUCTURE]], [[SETPROT()]]
+
[[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.  It is the same on all operating systems, however on non-OpenVMS platforms the 'System' mask and the 'Delete' mask are ignored.  The GETPROT() function always returns a character string in upper case.
+
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>
  
 
==Products==
 
Recital Server, Recital
 
 
[[Category:Documentation]]
 
[[Category:Documentation]]
 
[[Category:Functions]]
 
[[Category:Functions]]

Latest revision as of 10:25, 9 February 2012

Purpose

Function to return current file-protection mask

Syntax

GETPROT()

See Also

GETGID(), GETUID(), SETPROT()

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)