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> dirattget() / dirattset()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 DirAttGet() / DirAttSet()
------------------------------------------------------------------------------
 Purpose:
 Get / set the extended file attributes of a directory.

 Syntax:
 dwAtt = DirAttGet( lpszPath )
 dwAtt = DirAttSet( lpszPath, dwNewAtt )

 Parameters:
 lpszPath The full NetWare path of the directory.
 dwNewAtt The new attribute mask value.

 Returns:
 A numeric value (unsigned long int).

 Description:
 DirAttGet() returns the extended file attributes of the complete
 directory path specified by lpszPath. lpszPath must be the full NetWare
 path of the directory, including the volume name. Returns a numeric value
 containing a mask of the extended attributes.

 DirAttSet() sets the extended file attributes of the specified
 directory lpszPath to the value specified by dwNewAtt and returns the
 previous extended file attributes.
 Returns NOVERRLONG if an error occurs.
 The attributes can be determined from the following table:
 Attribute               Hex Value   Decimal
 HIDDEN                  0x00000002  2
 SYSTEM                  0x00000004  4
 SUBDIRECTORY            0x00000010  16
 PRIVATE                 0x00000800  2048
 IMMEDIATE PURGE (386)   0x00010000  65536
 RENAME INHIBIT (386)    0x00020000  131072
 DELETE INHIBIT (386)    0x00040000  262144

 Example:
 T// o return the attributes mask of directory "SYS:DATA\WP":
 dwCurrAttrib = DirAttGet( "SYS:DATA\WP" )
 // Sample:18 = 16 + 2 ( subdir + hidden )
 if ( dwCurrAttrib != NOVERRLONG )
    ? "The attributes of SYS:DATA\WP are", dwCurrAttrib
 endif
 // To rename inhibit directory SYS:DATA\WP:
 dwOldAttrib = DirAttGet( "SYS:DATA\WP" )
 if ( dwOldAttrib != NOVERRLONG )
    dwNewAttrib = dwOldAttrib + 131072
    DirAttSet( "SYS:DATA\WP", dwNewAttrib )
    dwCurrAttrib = DirAttGet( "SYS:DATA\WP" )
    ? "The attributes of SYS:DATA\WP are now ", dwCurrAttrib
 endif

 Notes:
 DirAttGet() and DirAttSet() can only Get / set the
 attributes on a NetWare 386 Server and appropriate trustee access rights
 are required.

See Also: FilAttGet() / FilAttSet()

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