Product SiteDocumentation Site

5.4.25.21. list


>>-list--------------------------------------------------------><

Returns an array of files/directories names which are immediate children of the directory denoted by the absolute path of the receiver object. The order in which the names are returned is dependent on the file system (not necessarily alphabetic order). The special names "." and ".." are not returned.
The result is an array of strings. If the receiver object is not a directory then the result is .nil.

Example 5.210. Class FILE - list method


names = .File~new("c:\program files\oorexx\samples")~list
say names -- an Array
say names~toString
/* Possible output */
api
ccreply.rex
complex.rex
drives.rex
factor.rex
(etc...)