Ejemplo n.º 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)
Ejemplo n.º 2
0
 def ukey(self, path):
     return tokenize(self.info(path)["modificationTime"])
Ejemplo n.º 3
0
Archivo: local.py Proyecto: 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))
Ejemplo n.º 4
0
 def ukey(self, url):
     """Unique identifier; assume HTTP files are static, unchanging"""
     return tokenize(url, self.kwargs, self.protocol)
Ejemplo n.º 5
0
 def ukey(self, path):
     return tokenize(path, self.fo, self.protocol)
Ejemplo n.º 6
0
 def ukey(self, path):
     return tokenize(path, self.kwargs, self.protocol)