示例#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
 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)