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

 Syntax:
 dwAtt = DirAttributeGet( lpszPath )
 dwAtt = DirAttributeSet( lpszPath, dwNewAtt )

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

 Returns:
 A numeric value (unsigned long int).

 The CA-Clipper names for these functions are:
 DirAttGet() / DirAttSet()

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

 DirAttributeSet() 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 = DirAttributeGet( "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 = DirAttributeGet( "SYS:DATA\WP" )
 if ( dwOldAttrib != NOVERRLONG )
    dwNewAttrib = dwOldAttrib + 131072
    DirAttributeSet( "SYS:DATA\WP", dwNewAttrib )
    dwCurrAttrib = DirAttributeGet( "SYS:DATA\WP" )
    ? "The attributes of SYS:DATA\WP are now ", dwCurrAttrib
 endif

 Notes:
 DirAttributeGet() and DirAttributeSet() can only get or set the
 attributes on a NetWare 386 Server and appropriate trustee access rights
 are required.

See Also: FilAttributeGet() / FilAttributeSet()

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