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

 Syntax:
 iAccess = DirAccRtGet()

 Parameters:
 None.

 Returns:
 A numeric value (signed short int).

 Description:
 DirAccRtGet() returns the directory access rights of a user to the last
 directory returned by ObjDirLst(). ObjDirLst() must be called before
 DirAccRtGet() 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
 DirAccRtGet() 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 = ObjDirLst(0, UsrIDGet( "JANE" ), TRUE)
 do while !empty( lpszCurrDir )
    lpszrights = NovRgtStr(DirAccRtGet())
    ? lpszCurrDir,"has access rights ", lpszrights
    lpszCurrDir = ObjDirLst(0, UsrIDGet( "JANE" ), FALSE)
 enddo

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

See Also: ObjDirLst() NovRgtStr()

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