Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Foxlib v1.0 - <b>getattr</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
GETATTR

Syntax:                 GETATTR

Use:                    To determine the file attribute.

Parameters:             The subdirectory and the file name (e.g.
                        \FOXPRO\FOXPROLN.EXE).  Do not include the drive
                        letter and the colon, but you must include the
                        backslash "\".

Returns:                The first character in the sending parameter will
                        have the file attribute.  If you did not pass the
                        parameter correctly (e.g. FOXLIB = "\FOXPRO\"),
                        your sending parameter will be unchanged.

Example:                . load c:\FOXLIB\getattr
                        . FOXLIB = "\IO.SYS"
                        . call getattr with FOXLIB
                        . ?asc(substr(FOXLIB,1,1))
                        39
                        . rele modu getattr

                        From this example, the file attribute is archive,
                        system, hidden, and read-only.  Below is a list of
                        all possible outcomes:

                        Archive, system, hidden, read-only = 39
                        Archive                            = 32
                        Archive, system                    = 36
                        Archive, system, hidden            = 38
                        Archive, hidden                    = 34
                        Archive, read-only                 = 33
                        System                             = 4
                        System, hidden                     = 6
                        System, read-only                  = 5
                        Hidden                             = 2
                        Hidden, read-only                  = 3
                        Read-only                          = 1

                        No attributes set                  = 0

Notes:                  You can only obtain the file attribute from the
                        current drive.  For example, you are in drive C, and
                        you want to obtain the file attribute for a file on
                        drive D.  Use the SETDRIVE command to set the
                        current drive to D, and then use the GETATTR
                        command.

See Also: SETATTR

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