Filesystem operations¶
Filesystem-related operations.
-
morphocut.file.Find(root, extensions)[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).
- Returns
Variable[str] – Path of the matching file.
-
morphocut.file.Glob(pathname, recursive=False)[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.seporos.altsepthen 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.