|
|||||
|
||||||
Related Syntax | Other Library Functions |
function |
vfs.list |
Library: General, File system utilities (OMVFS)
Import: omvfs.xmd |
export external function list matching value stream match optional initial {'*'} on value directory on-dir optional into modifiable stream names include value integer include optional initial {all-contents}
Argument definitions
You can use vfs.list to list the files and/or directories in a directory. The results are returned as the items in a modifiable stream shelf. The following program lists all the xml files in a directory:
import "omvfs.xmd" prefixed by vfs. process local stream listing variable vfs.list "c:\foo\bar\*.xml" into listing include vfs.all-files repeat over listing output listing || "%n" again
To list the files in the current working directory, simply specify the selection criteria alone without the path information:
import "omvfs.xmd" prefixed by vfs. process local stream listing variable vfs.list "*.xml" into listing include vfs.all-files repeat over listing output listing || "%n" again
The include must be one of the following values:
The following exceptions may occur:
The precise wildcard matching algorithm used is platform dependent, and thus a given file pattern may match a slightly different set of files on different platforms in some cases. For instance, the selection criteria "*.xml" will match a file named "foo.xmlx" on Windows but not on UNIX.