ls(paths,
depth_0=False,
depth_1=False,
recursive=False,
file=False,
dir=False,
link=False)
| source code
|
Generates a stream of objects of type osh.file.File .
paths may be a single path or a sequence of paths Each path
in paths is expanded as a Unix "glob" pattern. If
no path is specified, then the files in the current directory are output.
If depth_0 is True, then only files matching the specified
pathss are output; any qualifying directories are not explored. If
depth_1 is True, then behavior is as for
depth_0 except that files in qualifying directories are
output as well. If recursive is True, then directories are
recursively explored. At most one of the last three arguments may be
True. If all are False, then depth_1 behavior is obtained.
Files are listed if and only if file is true. Directories
are listed if and only if dir is true. Symlinks are listed
if and only if link is true. If file ,
dir and link are all false, then files,
directories and symlinks are listed. Symlinks to directories are not
explored.
|