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> filmodidget() / filmodidset()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 FilModIDGet() / FilModIDSet()
------------------------------------------------------------------------------
 Purpose:
 Get / set the ID of the last object to modify a file.

 Syntax:
 dwObjID = FilModIDGet( lpszPath )
 dwObjID = FilModIDSet( lpszPath, dwNewID )

 Parameters:
 lpszPath The full NetWare directory path of the file.
 dwNewID  The new ID of the last object to modify the file.

 Returns:
 A numeric value (unsigned long int).

 Description:
 FilModIDGet() returns the bindery object ID number of the lastuser
 that modified the file specified by lpszPath. lpszPath must be the full
 path of the file, including the volume name, e.g. SYS:DATA\WP\KATIE.DOC.

 FilModIDSet() sets the ID of the last object to modify the specified
 file lpszPath to the specified bindery ID number dwNewID and returns the
 previous ID.

 Returns NOVERRLONG if an error occurs.

 Example:
 // To return the name of the user that last modified the file
 // SYS:DATA\WP\KATIE.DOC:

 dwModID = FilModIDGet( "SYS:DATA\WP\KATIE.DOC")
 lpszModUser = UsrNameGet( dwModID )
 if ( !empty( lpszModUser ) )
    ? "SYS:DATA\WP\KATIE.DOC was last modified by", lpszModUser
 endif

 // To change the last object to modify file SYS:DATA\KATIE.DOC to user
 // JOHN:

 dwNewID = UsrIDGet( "JOHN" )
 dwOldID = FilModIDSet( "SYS:DATA\KATIE.DOC", dwNewID )
 dwNewID = FilModIDGet( "SYS:DATA\KATIE.DOC" )
 lpszNewuser = UsrNameGet( dwnewID )
 lpszOlduser = UsrNameGet( dwoldID )
 if ( !empty( lpszNewuser ) )
    ? "SYS:DATA\KATIE.DOC' last modifier was ", lpszOlduser
    ? "SYS:DATA\KATIE.DOC' last modifier is now ", lpszNewuser
 endif

 Notes:
 These functions only work with NetWare 386 and appropriate trustee
 access rights are required.

See Also: FilOwnIDGet() / FilOwnIDSet() FilModDteGet() / FilModDteSet() FilModTmeGet() / FilModTmeSet()

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