Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- The Library for Clipper - <b>l_attrib()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
                                 L_ATTRIB()


Syntax:        L_ATTRIB(<expC1> [,<expC2> ,<expC3>])


Purpose:       Get or set attributes of a specified file.


Arguments:     <expC1> is MANDATORY, and is the filename whose
               attribute(s) are required or whose attribues are to be
               set.

               <expC2> is OPTIONAL, and is the character attribute to be set.
               A = Archive, H = Hidden, R = Read_only, S = System.

               <expC3> is OPTIONAL and defines the action to be taken.
                + signifies the positive action of SETTING attributes.
                - signifies the action of UNSETTING attribute(s).


Returns:       A numeric value.
               -1 = Syntax Error.
               SETTING attribute(s)
                   0 = Successful, 2 = File not found.
                   3 = Path not found or does not exist.
                   4 = Attribute cannot be changed.

               GETTING attribute(s)
                   128 = ReadOnly, 129 = Hidden, 130 = System, 160 = Archive

               These attributes have 128 added to them to differentiate
               between error messages and attributes.
               Therefore 1 = ReadOnly, 2 = Hidden, 4 = System and 32= Archive.
               This value returned may comprise more than one attribute. For example,
               a returned value of 167 signifies ReadOnly, System, Archive and Hidden.
               i.e. 167 - 128 = 39 = 32 + 4 + 2 + 1

Examples:      ? L_ATTRIB("SALES.DBF","Q","+")       && Result: -1 (Syntax Error)
               ? L_ATTRIB("A:\SALES.DBF","R","+")    && Result: 0 (Successful)
               ? L_ATTRIB("SALES.DBF")               && Result: 160 (Archive)


Language:      Assembler

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