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

 Syntax:
 lpszValue = NovAttributeString( dwValue )

 Parameters:
 dwValue The file or directory attribute value.

 Returns:
 A character string of length 18

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

 Description:
 NovAttributeString() is used to convert a numeric attribute value into a
 character string representation.

 NovAttributeString() can be used to convert values returned by the
 functions DirAttributeGet(), FilAttributeGet() and DflAttributeGet() to a
 character string similar to the one used by NetWare command line utilities
 such as FLAG.EXE.

 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 return the character mask for the file SYS:PUBLIC\KATIE.TXT:
 dwAttrib = FilAttributeGet( "SYS:PYBLIC\KATIE.TXT" )
 if ( NWErrorGet() = 0 )
    ? "The file attributes of SYS:PUBLIC\KATIE.TXT "
    ?? "are", NovAttributeString( dwAttrib )
 endif

 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

 Notes:
 For more information on attributes see Chapter 1, Introduction.

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

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