[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
+---------------------------------+
| ADIR |
+---------------------------------+
ADIR(<array> [, <expC1>
[, <expC2>]])
-----------------------------------
Places matching file information into an array.
Return value - Numeric
-----------------------------------
Returns the number of files that match a file skeleton and places file
information - names, sizes, dates, times and DOS attributes - into an
array.
<array>
Array where information about matching files is placed.
<expC1>
File skeleton.
<expC2>
Expands search to include additional files. <expC2> can be one or more
of the following:
D for subdirectories
H for hidden files
S for system files
V for volume name
The table below describes what each column in array contains and array
data type:
Column Information Data Type
-------------------------------
1 File names Character
2 File sizes Numeric
3 File dates Date
4 File times Character
5 File attributes Character
Last array column contains DOS attributes of matching files. These
attributes are expressed with letter or letters. The table below
indicates what attribute each letter represents.
Letter Attribute
-------------------------------
A Archive (Read & Write)
H Hidden
R Read only
S System
D Directory
If array in ADIR() doesn't exist it is created. If array exists and
isn't large enough it is expanded; if array is larger than necessary,
its size is reduced.
+---------------------------------+
| Examples |
+---------------------------------+
This procedure returns volume label when you supply drive letter:
PROCEDURE volume
PARAMETER drive
string = drive + ':'
DIMENSION temparray(1)
=ADIR(temparray,(string),'V')
RETURN temparray(1)
The example below shows how to call procedure shown above:
?VOLUME('C')
CDISK
The table below shows some sample arguments and their effects on file
searches:
Arguments Files Searched
-----------------------------------
(ARRAY1,'*.DBF') All database files
(ARRAY1,'A*.DBF') All database files beginning with letter A
(ARRAY1,'?A*.DBF') All database files with A as second letter
(ARRAY1,'*A?.DBF') All database files with A as second to last letter
(ARRAY1,'?.*') All single-letter files with or without extension
(ARRAY1,'','H') All hidden files
(ARRAY1,'*.DBF','H') All databases, including hidden ones
(ARRAY1,'','D') All subdirectories of current directory
(ARRAY1,'C:\FOXPRO\*','D') All subdirectories of FOXPRO directory
-----------------------------------
See Also: AFIELDS(), DIMENSION, DIRECTORY, FILER
-----------------------------------
See Also:
AFIELDS()
DIMENSION
DIRECTORY
FILER
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson