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> novattributevalue()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 NovAttributeValue()
------------------------------------------------------------------------------
 Purpose:
 Convert file and directory attributes from a string to a value format.

 Syntax:
 dwValue = NovAttributeValue( lpszValue )

 Parameters:
 lpszValue  The character string representation of the attribute.

 Returns:
 A numeric value (unsigned long).

 The CA-Clipper name for this function is:
 NovAttVal()

 Description:
 NovAttributeValue() is used to convert a character string rights
 representation into a numeric attribute value. The character string passed
 to this function must contain either the appropriate rights characters in
 the correct positions  or spaces in the positions that do not have a
 particular attribute.

 The complete character string of attributes is:
 RoSAEHSyITPRaWaCDR

 Attribute                           Position

 Ro = Read Only / Rw = Read Write    1-2
 S  = Shareable                      3
 A  = Archive                        4
 E  = Execute only                   5
 H  = Hidden                         6
 Sy = System                         7-8
 I  = Indexed                        9
 T  = Transactional                  10
 P  = Purgeable                      11
 Ra = Read Audit                     12-13
 Wa = Write Audit                    14-15
 C  = Copy Inhibit                   16
 D  = Delete Inhibit                 17
 R  = Rename Inhibit                 18

 Example:
 // To make the file SYS:PUBLIC\WP.DOC read only using the
 // character mask:
 dwAttrib = FilAttributeGet( "SYS:PUBLIC\WP.DOC" )
 lpszMask = NovAttributeString( dwAttrib )
 if ( dwAttrib != NOVERRLONG )
    ? "The file attributes of SYS:PUBLIC\WP.DOC are", lpszMask
    lpszMask[2] = "o"       // change to read only
    dwNewAttrib = NovAttributeValue( lpszMask )
    dwOldAttrib = FilAttributeSet( "SYS:PUBLIC\WP.DOC", dwNewAttrib )
    if ( dwOldAttrib != NOVERRLONG )
       ? "The file attributes of SYS:PUBLIC\WP.DOC "
       ?? "are now changed to", NovAttributeString( dwNewAttrib )
    endif
 endif

See Also: NovAttributeString() FilAttributeGet() / FilAttributeSet() DirAttributeGet() / DirAttributeSet() DflAttributeGet()

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