Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- CA-Clipper Tools . Book 4-Appendices - <b>nnetfiles()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 NNETFILES()
 Determines the extended information about subdirectories
------------------------------------------------------------------------------
 Syntax

     NNETFILES([<cPath>],[<nAttr>|<cAttr>],[<l386>])
        --> aFiles

 Arguments

     <cPath>  Designates the directory for which the subdirectories are
     read.  The parameter contains a search mask for the directories that are
     read.  Within the search mask, the wildcard characters "?" and "*" can
     be used.

     <nAttr>  Designates the file attributes in numeric form, according
     to the following table.  The default (0) designates  normal files.

     <cAttr>  Designates the file attributes in form of a character
     string, according to the following table .  The default value ("")
     designates  normal files.

     <l386> Designates whether NNETFILES() also returns extended
     information that is only available on Netware 3.x servers.  The
     parameter must be designated .T..  The default value (.F.) does not
     return extended information.

 Returns

     NNETFILES() returns an array with subarrays (two-dimensional array).
     Each subarray contains information about each directory entry that is
     found.  The structure of the subarrays are described in the following
     table.

     Table 23.5:  NNETFILES() Subarray Structure
     ------------------------------------------------------------------------
     Position     Metasymbol     CTNNET.CH      Definition 
     ------------------------------------------------------------------------
     1            cName          NF_NAME        Directory name
     2            nSize          NF_SIZE        File size
     3            cUpdDate       NF_UPDDATE     Date of last update
     4            cUpdTime       NF_UPDTIME     Time of last update
     5            dCrDate        NF_CREADATE    Creation date
     6            nAttr          NF_ATTR        File attributes
     7            nExtAttr       NF_EXTATTR     Extended file attributes
     8            cOwner         NF_OWNER       Owner
     ------------------------------------------------------------------------

     If <l386> has been designated .T., the returned array contains the
     following extension:

     Table 23.6:  Extended NNETFILES() Subarray Structure
     ------------------------------------------------------------------------
     Position     Metasymbol     CTNNET.CH      Definition
     ------------------------------------------------------------------------
     9            cArcDate       NF_ARCDATE     Date of last archive
     10           nArcTime       NF_ARCTIME     Time of last archive
     11           cArchiver      NF_ARCHIVER    Name of archivist
     ------------------------------------------------------------------------

 Description

     NOVELL NET FILES
     NNETFILES() returns extended information about files on file servers.
     The files can be specified by a search mask in <cPath> and by
     determining the file attribute.  The attribute can be passed in the form
     of a numeric value or a character string:

     Table 23.7:  Coding of File Attributes for NNETFILES()
     ------------------------------------------------------------------------
     Value   Symbol    Definition
     ------------------------------------------------------------------------
     1       R         Read Only
     2       H         Hidden directories
     4       S         System directories
     32      A         Archive bit set
     ------------------------------------------------------------------------

     To specify an attribute, numeric values must be added or the related
     symbols must be added to a character string.

 Examples

     .  Read the files in L:\, and display the file names:

        #include "ctnnet.ch"

        aFiles=NNETFILES('L:\*.*')

        FOR i=1 TO LEN(aFiles)
           ? aFiles[i,NF_NAME]
        NEXT i

     .  Read the files in NANGERTOOLS1/VOL1:DATA, including the hidden
        files and the system files:

        aFiles=NNETFILES('NANGERTOOLS1/VOL1:DATA/*.*','SH')

     .  Read the files in L:\ with extended 3.x information, and
        display he file names and the date of the last archive:

        #include "ctnnet.ch"

        aFiles=NNETFILES('L:\*.*',,.T.)

        FOR i=1 TO LEN(aFiles)
           ? aFiles[i,NF_NAME],aFiles[i,NF_ARCDATE])

        NEXT i

See Also: NNETDIRS()

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