Difference between revisions of "ADIR()"
Yvonne.milne (Talk | contribs) |
Helen.george (Talk | contribs) |
||
Line 11: | Line 11: | ||
The ADIR() function returns the number of files and/or directories which match the specified file skeleton and loads file information into the array <array>. The following 'wild card' characters can be used in the <skeleton>: | The ADIR() function returns the number of files and/or directories which match the specified file skeleton and loads file information into the array <array>. The following 'wild card' characters can be used in the <skeleton>: | ||
− | {| class="wikitable" width = 100% | + | {| class="wikitable" width="100%" |
− | !width=50%|Character||width=50%|Description | + | !width="50%"|Character||width="50%"|Description |
|- | |- | ||
|?||Matches any one character. | |?||Matches any one character. | ||
Line 22: | Line 22: | ||
If ADIR() returns a value greater than 0, the <array> will be created if it does not exist and resized if previously in existence. The ADIR() function will load the following information about the files/directories into the array: | If ADIR() returns a value greater than 0, the <array> will be created if it does not exist and resized if previously in existence. The ADIR() function will load the following information about the files/directories into the array: | ||
− | {| class="wikitable" width = 100% | + | {| class="wikitable" width="100%" |
− | !width=25%|Column||width=25%|Type||width=50%|Contents | + | !width="25%"|Column||width="25%"|Type||width="50%"|Contents |
|- | |- | ||
|1||Character||Name | |1||Character||Name | ||
Line 39: | Line 39: | ||
The attributes filter in <expC> can be any of the following: | The attributes filter in <expC> can be any of the following: | ||
− | {| class="wikitable" width = 100% | + | {| class="wikitable" width="100%" |
− | !width=50%|Letter||width=50%|Attribute | + | !width="50%"|Letter||width="50%"|Attribute |
|- | |- | ||
|A||Archive (Read/Write) | |A||Archive (Read/Write) | ||
Line 56: | Line 56: | ||
The flags <expN> parameter is determines the case of the file names returned. Note: on Linux/Mac this is parsed, but ignored. The file names are always returned in their original case. | The flags <expN> parameter is determines the case of the file names returned. Note: on Linux/Mac this is parsed, but ignored. The file names are always returned in their original case. | ||
− | {| class="wikitable" width = 100% | + | {| class="wikitable" width="100%" |
− | !width=50%|Flag||width=50%|Case | + | !width="50%"|Flag||width="50%"|Case |
|- | |- | ||
|||Upper | |||Upper |
Revision as of 10:55, 31 January 2013
Contents
Purpose
Function to return number of files and/or directories matching a file pattern and load file information into an array
Syntax
ADIR(<array> [, <skeleton> [, <expC> [, <expN>]]])
See Also
AADD(), AAVERAGE(), ACOPY(), ADEL(), ADESC(), AELEMENT(), AFIELDS(), AFILL(), AINS(), ALEN(), AMAX(), AMIN(), APPEND FROM ARRAY, ARRAY(), ASCAN(), ASIZE(), ASORT(), ASTORE(), ASTRING(), ASUBSCRIPT(), ASUM(), COPY TO ARRAY, DECLARE, DIMENSION, FDATE(), FILE(), GATHER, IN_ARRAY(), IS_ARRAY(), LOCAL, PRIVATE, PUBLIC, RELEASE, RESTORE, SAVE, SCATTER
Description
The ADIR() function returns the number of files and/or directories which match the specified file skeleton and loads file information into the array <array>. The following 'wild card' characters can be used in the <skeleton>:
Character | Description |
---|---|
? | Matches any one character. |
* | Matches zero or more characters. |
If ADIR() returns a value greater than 0, the <array> will be created if it does not exist and resized if previously in existence. The ADIR() function will load the following information about the files/directories into the array:
Column | Type | Contents |
---|---|---|
1 | Character | Name |
2 | Numeric | Size |
3 | Date | Last modification date |
4 | Character | Last modification time |
5 | Character | Attributes |
The attributes filter in <expC> can be any of the following:
Letter | Attribute |
---|---|
A | Archive (Read/Write) |
H | Hidden |
R | Read only |
S | System |
D | Directory |
The flags <expN> parameter is determines the case of the file names returned. Note: on Linux/Mac this is parsed, but ignored. The file names are always returned in their original case.
Flag | Case |
---|---|
Upper | |
0 | Upper |
1 | Original |
Example
nTables = adir(aTables, "*.dbf")