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

 Syntax:
 dwOwnID = FilOwnIDGet ( lpszPath )
 dwOwnID = FilOwnIDSet ( lpszPath, dwNewID )

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

 Returns:
 A numeric value (unsigned long int).

 Description:
 FilOwnIDGet() 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.

 FilOwnIDSet() 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 = FilOwnIDGet( "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 = FilOwnIDSet( "SYS:DATA\KATIE.DOC", dwNewOwnerID )
 lpszNewOwnerName = UsrNameGet( FilOwnIDGet("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: DirFilLst() FilCreDteGet() / FilCreDteSet() FilCreTmeGet() / FilCreTmeSet() UsrNameGet()

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