find_and_filter_files#

atomate2.common.files.find_and_filter_files(file_client: FileClient, directory: str | Path, include_files: list[str | Path] | None, exclude_files: list[str | Path] | None, host: str | None) list[Path][source]#

Find and filter files.

Parameters
file_clientFileClient

A file client.

directorystr or Path

A directory in which to find files.

include_filesNone or list of (str or Path)

Filenames to include as a list of str or Path objects given relative to directory. Glob file paths are supported, e.g. “*.dat”. If None, all files in the source directory will be returned.

exclude_filesNone or list of (str or Path)

Filenames to exclude. Supports glob file matching, e.g., “*.dat”.

hoststr or None

A hostname used to specify a remote filesystem. Can be given as either “username@host” or just “host” in which case the username will be inferred from the current user. If None, the local filesystem will be used.

Returns
list of Path

A list of file paths.