Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Novlib 3.30 Online Reference - <b> filirmskget() / filirmskset()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 FilIRMskGet() / FilIRMskSet()
------------------------------------------------------------------------------
 Purpose:
 Get / set the file inherited rights mask.

 Syntax:
 iRights = FilIRMskGet( lpszPath )
 iRights = FilIRMskSet( lpszPath, iNewRights )

 Parameters:
 lpszPath   The full NetWare directory path of the file.
 iNewRights The new inherited rights mask.

 Returns:
 A numeric value (signed short int).

 Description:
 FilIRMskGet() returns the inherited rights mask of the file specified
 by lpszPath which must be the full directory path including the volume
 name, e.g.

 SYS:DATA\WP\KATIE.DOC.

 FilIRMskSet() sets the inherited rights mask of the file specified by
 lpszPath to the specified value iNewRights and returns the previous value.
 The mask can be calculated from the following table:
 Value Attribute (NetWare 386 & NetWare 4.0)

 1     Read
 2     Write
 4     Reserved
 8     Create
 16    Erase
 32    Access Control
 64    File Scan
 128   Modify
 256   Supervisor

 Returns NOVERRINT if an error occurs.

 Example:
 // To return the inherited rights mask of SYS:DATA\WP\KATIE.DOC:

 iRightsMask = FilIRMskGet( "SYS:DATA\WP\KATIE.DOC" )
 if ( iRightsMask != NOVERRINT )
    ? "The rights mask of SYS:DATA\WP\KATIE.DOC is", iRightsMask
 endif

 // To change the inherited rights mask of file SYS:DATA\WP.DOC to Read &
 // File Scan:

 iOldRights = FilIRMskSet( "SYS:DATA\WP.DOC", 65 )
 iNewRights = FilIRMskGet( "SYS:DATA\WP.DOC" )
 if ( iNewRights != NOVERRINT )
    ? "File SYS:DATA\WP.DOC's inherited rights were ", iOldRights
    ? "File SYS:DATA\WP.DOC's inherited rights are now ", iNewRights
 endif

 Notes:
 For a list of rights, see DirEffRtGet().

 Appropriate trustee access rights are required to use these functions.

See Also: DirEffRtGet()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson