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> diraccessrightsget()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 DirAccessRightsGet()
------------------------------------------------------------------------------
 Purpose:
 Get an object's trustee rights to a directory.

 Syntax:
 iAccess = DirAccessRightsGet()

 Parameters:
 None.

 Returns:
 A numeric value (signed short int).

 The CA-Clipper name for this function is:
 DirAccRtGet()

 Description:
 DirAccessRightsGet() returns the directory access rights of a user to the
 last directory returned by ObjDirList(). ObjDirList() must be called before
 DirAccessRightsGet() to obtain a list of the directories to which the user
 has rights. Returns a numeric value associated with the following list of
 NetWare 2.x attributes. NetWare 3.x uses different rights values, but the
 DirAccessRightsGet() function transparently converts them to their
 NetWare 2.x equivalents for consistency.

 Value Attribute

 1     Read
 2     Write
 4     Open
 8     Create
 16    Delete
 32    Parental
 64    Search
 128   Modify
 256   N/A

 For example, if the user has read, open, write and create rights in the
 specified directory, the return value is 15 (i.e. 1 + 2 + 4 + 8).
 Returns NOVERRINT if an error occurs.

 Example:
 // To return a list of directories and their access rights for
 // user JANE on volume 0 (SYS):
 lpszCurrDir = ObjDirList(0, UsrIDGet( "JANE" ), TRUE)
 do while !empty( lpszCurrDir )
    lpszrights = NovRightsString(DirAccessRightsGet())
    ? lpszCurrDir,"has access rights ", lpszrights
    lpszCurrDir = ObjDirList(0, UsrIDGet( "JANE" ), FALSE)
 enddo

 Notes:
 Use NovRightsString() to create a string representation of the
 access rights.

See Also: ObjDirList() NovRightsString()

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