diff --git a/s3fs/core.py b/s3fs/core.py index d5a55697..12d7057f 100644 --- a/s3fs/core.py +++ b/s3fs/core.py @@ -1929,6 +1929,13 @@ async def _invalidate_region_cache(self): invalidate_region_cache = sync_wrapper(_invalidate_region_cache) + @property + def fsid(self): + """Persistent filesystem id that can be used to compare filesystems + across sessions. + """ + return "s3" + class S3File(AbstractBufferedFile): """ diff --git a/s3fs/tests/test_s3fs.py b/s3fs/tests/test_s3fs.py index 8fe2af5a..f91b9ff8 100644 --- a/s3fs/tests/test_s3fs.py +++ b/s3fs/tests/test_s3fs.py @@ -2574,3 +2574,7 @@ def test_cp_two_files(s3): target + "/file0", target + "/file1", ] + + +def test_fsid(s3): + assert s3.fsid == "s3"