Difference between revisions of "ADIR()"

From Recital Documentation Wiki
Jump to: navigation, search
(Description)
 
Line 27: Line 27:
  
  
The ADIR() function may also be used to load directory information into arrays.
+
The ADIR() function may also be used to load file information into arrays.
  
  
Line 49: Line 49:
  
 
If the compatibility setting is set to FoxPro, SET COMPATIBLE TO FOXPRO, ADIR() is fully compatible with FoxPro syntax and behavior.
 
If the compatibility setting is set to FoxPro, SET COMPATIBLE TO FOXPRO, ADIR() is fully compatible with FoxPro syntax and behavior.
 
  
 
==Example==
 
==Example==

Latest revision as of 12:19, 15 February 2018

Purpose

Function to return number of files matching a file pattern


Syntax

ADIR(<skeleton> [,<array1> [,<array2> [,<array3> [,<array4> [,<array5>]]]]])


See Also

AADD(), AAVERAGE(), ABROWSE(), ACHOICE(), ACOL(), ACOPY(), ADEL(), ADESC(), AELEMENT(), AFIELDS(), AFILL(), AINS(), ALEN(), AMAX(), AMIN(), APPEND FROM ARRAY, AROW(), 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 which match the specified file skeleton. The following 'wild card' characters can be used:


Character Description
? Matches any one character.
% Matches any one character.
* Matches zero or more characters.


The ADIR() function may also be used to load file information into arrays.


Parameters Description
<skeleton> The character string specifying the file skeleton.
<array1> The name of a pre-declared array in which to load the character string file names that match the specified skeleton.
<array2> The name of a pre-defined array in which to load the numeric type file size in bytes of the files that match the specified skeleton.
<array3> The name of a pre-defined array in which to load the date type creation date of the files that match the specified skeleton.
<array4> The name of a pre-defined array in which to load the character type creation time of the files matching the specified skeleton.
<array5> The name of a pre-defined array. This option has been added for compatibility purposes only. An element containing the character string "A" will be loaded for each file that matches the specified skeleton.


If the compatibility setting is set to FoxPro, SET COMPATIBLE TO FOXPRO, ADIR() is fully compatible with FoxPro syntax and behavior.

Example

declare files[adir("*.dbf")]
nTables = adir("*.dbf",files)


Products

Recital Server, Recital