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> filowneridget() / filowneridset()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 FilOwnerIDGet() / FilOwnerIDSet()
------------------------------------------------------------------------------
 Purpose:
 Get or set the owner object ID of a file.

 Syntax:
 dwOwnID = FilOwnerIDGet ( lpszPath )
 dwOwnID = FilOwnerIDSet ( lpszPath, dwNewID )

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

 Returns:
 A numeric value (unsigned long int).

 The CA-Clipper names for these functions are:
 FilOwnIDGet() / FilOwnIDSet()

 Description:
 FilOwnerIDGet() returns the bindery object ID of the user that owns or
 created the file specified by lpszPath. lpszPath must be the full path
 of the file including the volume name, for example, SYS:DATA\KATIE.DOC.

 FilOwnerIDSet() sets the owner ID for the file specified by lpszPath to
 dwNewID and returns the previous value.

 Returns NOVERRLONG if an error occurs.

 Example:
 // To return who created ( owns ) the file SYS:DATA\KATIE.DOC:

 dwOwnerID = FilOwnerIDGet( "SYS:DATA\KATIE.DOC" )
 lpszOwnerName = UsrNameGet( dwOwnerID )
 if ( !empty( lpszOwnerName ) )
    ? "SYS:DATA\KATIE.DOC is owned by", lpszOwnerName
 endif

 // To change who created ( owns ) the file SYS:DATA\KATIE.DOC to user
 // JOHN:

 dwNewOwnerID = UsrIDGet( "JOHN" )
 dwOldOwnerID = FilOwnerIDSet( "SYS:DATA\KATIE.DOC", dwNewOwnerID )
 lpszNewOwnerName = UsrNameGet( FilOwnerIDGet("SYS:DATA\KATIE.DOC") )
 if ( !empty( lpszNewOwnerName ) )
    ? "SYS:DATA\KATIE.DOC is now owned by ", lpszNewOwnerName
 endif

 Notes:
 Use UsrNameGet() to turn the object ID number into a name.

 Appropriate trustee access rights are required to use these functions.

See Also: DirFileList() FilCreateDateGet() / FilCreateDateSet() FilCreateTimeGet() / FilCreateTimeSet() UsrNameGet()

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