FIND_FILES action


Function
The action allows to find a file or directory in the defined directory.


Declaration
 FIND_FILES directory, mask, bRecursive, filesDesc, retCode
Parameters
directoryinExisting directory, where to find. TEXT type.
maskinName of the file or directory you want to look for. It can contains the characters * and ?. TEXT type.
bRecursiveinBOOLEAN type.
  • @TRUE - find recursively in subdirectories
  • @FALSE - find just in defined directory
filesDescin

Local structure of SD._System_FileInfo type or other structure definition consisting of the same column count and types.

NameTypeDescription
IsFileBoolean@TRUE, if a file was found (otherwise it's a directory).
CreateTimeAbs. timeTime when the file or directory was created.
AccessTimeAbs. timeFor a file, it is the time when the file was last read from or written to.
For a directory, the structure specifies when the directory was created.
ModifyTimeAbs. timeFor a file, it is the time when the file was last written to.
For a directory, it is the time when the directory was created.
SizeRealFile size in bytes.
NameTextFile name.
AttribsIntegerFile (directory) attributes.
retCodeoutReturn code.
Return code
The value of the parameter retCodeIdent_Int - see the table of error codes.
Description
The action allows you to find the specified file (directory) within the given directory. The action finds and fill the result into the structure filesDes. The structure filesDesc contains a list of files and directories matching the given search condition. If needed, the action resize the structure.
If no file match the given condition (mask), the result structure will consists of 0 rows.
The structure filesDesc is updated only when retCode acquires the value "0" (ERR_NO_ERROR).
Example
 


RECORD (SD.ESL_FIND_FILES) _dir
 INT _retCode
 
 BEGIN
 FIND_FILES "c:\directory", "*", @TRUE, _dir, _retCode
 END

Related pages:

0 komentárov

Nie ste prihlásený. Akékoľvek zmeny, ktoré vykonáte, sa označia ako anonymné. Ak už máte svoj účet, pravdepodobne sa budete chcieť prihlásiť .