Filesystem operations¶
Filesystem-related operations.
-
morphocut.file.
Find
()[source]¶ Stream Find files under the specified directory.
- Parameters
root (str or Path, raw or Variable) – Root path where images should be found.
extensions (list, raw) – List of allowed extensions (including the leading dot).
sort (bool) – Sort results alphabetically (default false).
verbose (bool) – Print info about files (default false).
- Returns
Variable[str] – Path of the matching file.
-
morphocut.file.
Glob
()[source]¶ Stream Find files matching
pathname
.For more information see
glob
.- Parameters
pathname (str or Variable[str]) – Pattern for path names containing a path specification. Can be either absolute (like
/path/to/file
) or relative (like../../foo/*/*.bar
) and can contain shell-style wildcards. If the pattern is followed by anos.sep
oros.altsep
then files will not match.recursive (bool or Variable[bool]) – If true, the pattern “
**
” will match any files and zero or more directories, subdirectories and symbolic links to directories.
- Returns
Variable[str] – Path matching
pathname
.