Next: , Previous: , Up: Operating-System Interface   [Contents][Index]


15.4 Directory Reader

procedure: directory-read directory [sort?]

Directory must be an object that can be converted into a pathname by
->pathname. The directory specified by directory is read, and the contents of the directory is returned as a newly allocated list of absolute pathnames. The result is sorted according to the usual sorting conventions for directories, unless sort? is specified as #f. If directory has name, type, or version components, the returned list contains only those pathnames whose name, type, and version components match those of directory; wild or #f as one of these components means “match anything”.

The Windows implementation supports “globbing”, in which the characters * and ? are interpreted to mean “match anything” and “match any character”, respectively. This “globbing” is supported only in the file part of directory.