Filesystem operations

Filesystem-related operations.

morphocut.file.Find(root, extensions)[source]

Stream Find files under the specified directory.

  • 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).


Variable[str] – Path of the matching file.

morphocut.file.Glob(pathname, recursive=False)[source]

Stream Find files matching pathname.

For more information see glob.

  • 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 an os.sep or os.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.


Variable[str] – Path matching pathname.