quickie.conditions.FilesModified

class quickie.conditions.FilesModified(paths: Sequence[str | Path], *, exclude: Sequence[str | Path] = (), algorithm: str | Algorithm = Algorithm.TIMESTAMP, allow_missing: bool = False)

Check if files have been not being modified.

__init__(paths: Sequence[str | Path], *, exclude: Sequence[str | Path] = (), algorithm: str | Algorithm = Algorithm.TIMESTAMP, allow_missing: bool = False)

Initialize the check.

The algorithm can be one of FilesModified.Algorithm.

Parameters:
  • paths – The files to check.

  • exclude – The files to exclude from the check.

  • algorithm – The algorithm to use for checking.

  • allow_missing – If True, missing files will be treated as if they have not been modified.

Raises:

ValueError – If the algorithm is not supported.

Returns:

True if the files have been modified, False otherwise.

Methods

__init__(paths, *[, exclude, algorithm, ...])

Initialize the check.