To meet your needs, we constantly work to improve Querix products.
This means that Lycia documentation is developing as well.
In case you have found a certain dissonance between the provided information and the actual behavior of Lycia 3 and/or your applications, please, let us know about this via documentation@querix.com so that we can introduce the necessary changes to our documentation.
Thank you for your attention and cooperation.
The os.Path.dirsort method defines the sort criteria and sort order for the opened directory. The syntax of the function is as follows:
CALL os.Path.dirsort(
criteria,
order)
where:
· criteria = a variable of STRING data type standing for the sort criteria. This parameter must be defined by one of the following strings:
undefined = means that no sort criteria is set which is the default. In this case all the entries are read as returned by the os.Path methods,
name, size, extension or type = sorts the directory by file name, size, extension or type (directory, link, regular file) respectively,
atime = sorts the directory by access time,
mtime = sorts the directory by modification time;
· order = a variable of INTEGER data type which specifies whether the sort order is ascending or descending:
1 = defines the ascending order,
-1 = defines the descending order.
Usage
By this function invocation, the sort criteria and sort order are defined for any subsequent diropen call.
When using the sort criteria "name", the directory entries are ordered with regard to the current locale. When sorting by any other criteria, entries of the same value for the defined criteria are sorted by name following the value of the order parameter.
Here is an example of the os.Path.dirsort method calling:
#sort by name, ascending
CALL os.Path.dirsort("name", 1)