Пример #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
    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
 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
 def ukey(self, path):
     return tokenize(path, self.kwargs, self.protocol)