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> dirowneridget() / dirowneridset()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 DirOwnerIDGet() / DirOwnerIDSet()
------------------------------------------------------------------------------
 Purpose:
 Get or set a directory's owner object ID.

 Syntax:
 dwObjID = DirOwnerIDGet( lpszPath )
 dwObjID = DirOwnerIDGet( lpszPath, dwNewID )

 Parameters:
 lpszPath The full NetWare path name of the directory.
 dwNewID  The new owner ID.

 Returns:
 A numeric value (unsigned long int).

 The CA-Clipper names for these functions are:
 DirOwnIDGet() / DirOwnIDSet()

 Description:
 DirOwnerIDGet() returns the object ID of the user that owns or created
 the directory specified by lpszPath which must be the full path of the
 directory including the volume name, e.g. SYS:PUBLIC\MSDOS.

 DirOwnerIDSet() sets the owner of the specified directory lpszPath to the
 value specified by dwNewID and returns the previous owner ID.

 Returns NOVERRLONG if an error occurs.

 Example:
 // To return who created (owns) the directory SYS:DATA\WP:

 lpszOwnerName = UsrNameGet( DirOwnerIDGet( "SYS:DATA\WP" ))
 if ( !empty( lpszOwnerName ) )
    ? "Directory SYS:DATA\WP is owned by", lpszOwnerName
 endif

 // To change the owner of directory SYS:DATA\WP to KATIE:

 dwNewOwner = UsrIDGet("KATIE")
 dwOldOwner = DirOwnerIDSet( "SYS:DATA\WP", dwNewOwner )
 lpszOldName = UsrNameGet( dwOldOwner )
 lpszNewName = UsrNameGet( dwNewOwner )
 ? "Directory SYS:DATA\WP was owned by", lpszOldName
 ? "Directory SYS:DATA\WP is now owned by", lpszNewName

 Notes:
 Use UsrNameGet() to turn the object ID number into a name.
 Appropriate trustee access rights are required. When changing the Owner ID,
 make sure it is changed to a valid Object ID number.

See Also: DirSubDirList() DirCreateDateGet() / DirCreateDateSet() DirCreateTimeGet() / DirCreateTimeSet() UsrNameGet()

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