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>nnetdirs()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 NNETDIRS()
 Determines the extended information about subdirectories
------------------------------------------------------------------------------
 Syntax

     NNETDIRS([<cPath>],[<nAttr>|<cAttr>],[<l386>]) --> aDir

     Netware: 2.2 and 3.11

 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.  A file identifier is not permitted.  The search mask is
     ignored if the function is called on a Netware 2.x server, but this
     parameter must be passed.

     <nAttr>  Designates the file attributes in numeric form, according
     to the table in the description .  The default value is 16.

     <cAttr> Designates the file attributes in the form of a character
     string, according to the table in the description.  The default value is
     "D".

     <l386> Designates whether NNETDIRS() 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

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

     Table 23.1:  NNETDIRS() Subarray Structure
     ------------------------------------------------------------------------
     Position  Metasymbol CTNNET.CH    Definition 
     ------------------------------------------------------------------------
     1         cName      ND_NAME      Directory name
     2         dCrDate    ND_CREADATE  Creation date
     3         cCrTime    ND_CREATIME  Creation time
     4         nRights    ND_RIGHTS    Maximum (2.x) / Inherited (3.x) Rights
     5         cOwner     ND_OWNER     Owner
     ------------------------------------------------------------------------

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

     Table 23.2:  Extended NNETDIRS() Subarray Structure
     ------------------------------------------------------------------------
     Position     Metasymbol     CTNNET.CH      Definition
     ------------------------------------------------------------------------
     6            cUpdDate       ND_UPDDATE     Date of last update
     7            dUpdTime       ND_UPDTIME     Time of last update
     8            cArcDate       ND_ARCDATE     Date of last  archive
     9            nArcTime       ND_ARCTIME     Time of last archive
     10           cArchive       ND_ACHIVER     Name of archivist
     ------------------------------------------------------------------------

 Description

     NOVELL NET DIRECTORIES
     NNETDIRS() returns extended information about the subdirectories of file
     server directories.  On Netware 3.x servers, the subdirectories can be
     determined by a search mask in <cPath>.  You can also determine the
     default file attribute.  The attribute can be passed in the form of a
     numeric value or a character string:

     Table 23.3:  File Attribute Coding for NNETDIRS()
     ------------------------------------------------------------------------
     Value   Symbol    Definition
     ------------------------------------------------------------------------
     1       R         Read Only
     2       H         Hidden directories
     4       S         System directories
     16      D         Subdirectories (always set by  NNETDIRS())
     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.

     A call of NNETDIRS() for a Netware 2.x file server also requires a
     search mask in <cPath>; however, the mask is ignored.  Under Netware
     2.x, the function returns all subdirectories that correspond to the
     passed attributes.

 Examples

     .  Read the subdirectories of L:\, and display the directory
        names:

        #include "ctnnet.ch"

        aDirs=NNETDIRS('L:\*')

        FOR i=1 TO LEN(aDirs)
           ? aDirs[i,ND_NAME]
        NEXT i

     .  Read the subdirectories of NANGERTOOLS1/VOL1:DATA, including
        the hidden system directories:

        aDirs=NNETDIRS('NANGERTOOLS1/VOL1:DATA/*','SH')

     .  Read the subdirectories of L:\ with extended 3.x information.
        Display the directory name and the date of the last update:

        #include "ctnnet.ch"

        aDirs=NNETDIRS('L:\*',,.T.)

        FOR i=1 TO LEN(aDirs)
           ? aDirs[i,ND_NAME],aDirs[i,ND_UPDDATE])
        NEXT i

See Also: NNETFILES()

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