Exemple #1
0
 def get_file_revision(self, path, file_id=None):
     utf8_path = path.encode("utf-8")
     if utf8_path in self._manifest:
         # it's a file
         return self._get_file_last_modified_cl(utf8_path)
     elif self._has_directory(utf8_path):
         return self._get_dir_last_modified(utf8_path)
     else:
         raise errors.NoSuchId(self, file_id)
Exemple #2
0
 def id2path(self, file_id):
     if self._mapping is None:
         raise errors.NoSuchId(self, file_id)
     return self._mapping.parse_file_id(file_id).decode("utf-8")
Exemple #3
0
 def id2path(self, file_id):
     try:
         return self.lookup_path(file_id)
     except KeyError:
         raise errors.NoSuchId(self, file_id)