diff --git a/minato/filesystems/osfs.py b/minato/filesystems/osfs.py index 2af7040..45b6e14 100644 --- a/minato/filesystems/osfs.py +++ b/minato/filesystems/osfs.py @@ -28,7 +28,7 @@ def delete(self) -> None: remove_file_or_directory(self._path) def get_version(self) -> str | None: - return None + return str(self._path.stat().st_mtime_ns) @overload def open_file( diff --git a/minato/minato.py b/minato/minato.py index 8d647c3..42d5221 100644 --- a/minato/minato.py +++ b/minato/minato.py @@ -161,7 +161,7 @@ def cached_path( if is_local(url_or_filename): url_or_filename = extract_path(url_or_filename) - if not extract and not is_archive_file(url_or_filename): + if not (extract and is_archive_file(url_or_filename)): local_path = Path(url_or_filename) if not local_path.exists(): raise FileNotFoundError(local_path)