fsDirCatalog (Function) |
Top Previous Next |
fsDirCatalog is used to return the contents of the current directory - including sub-directories and files. When a sub-directory or file is created it is registered in the file system. The file system does not sort the contents by type (file or directory) or alphabetically but it assigns an index number to the file or directory as it is created. This index number is the input of the fsDirCatalog function, and it will return the name of the file or directory the index refers to.
The index number of a file or sub-directory may change when the content of a directory is modified, for example when files or sub-directories are created, deleted or moved.
Note: The working directory is on a per thread basis.
Input: index : INT (1..n) Index entry to return. The first entry is 1.
Returns: STRING Name of file or directory at the index specified. Empty if none.
Declaration: FUNCTION fsDirCatalog : STRING;
Example: INCLUDE rtcu.inc |