예제 #1
0
    def checksum(self, path, refresh=False):
        info = self.info(path, refresh=refresh)

        if info["type"] != "directory":
            return int(info["ETag"].strip('"').split("-")[0], 16)
        else:
            return int(tokenize(info), 16)
예제 #2
0
 def ukey(self, path):
     return tokenize(self.info(path)["modificationTime"])
예제 #3
0
파일: local.py 프로젝트: nik123/dvc
    def checksum(self, path) -> str:
        from fsspec.utils import tokenize

        st = os.stat(path)

        return str(int(tokenize([st.st_ino, st.st_mtime, st.st_size]), 16))
예제 #4
0
파일: http.py 프로젝트: PhanidharJammula/py
 def ukey(self, url):
     """Unique identifier; assume HTTP files are static, unchanging"""
     return tokenize(url, self.kwargs, self.protocol)
예제 #5
0
 def ukey(self, path):
     return tokenize(path, self.fo, self.protocol)
예제 #6
0
파일: zip.py 프로젝트: jobh/filesystem_spec
 def ukey(self, path):
     return tokenize(path, self.kwargs, self.protocol)