Beispiel #1
0
 def is_dir(self, existing_path):
     path_resolved = normalize(existing_path)
     try:
         item = self._items[path_resolved]
     except KeyError:
         raise filenotfounderror(existing_path)
     return item.get('is_dir', False)
Beispiel #2
0
 def touch(self, path):
     file_existed = self.exists(path)
     self._items[normalize(path)] = {}
     if not file_existed:
         self.notify_file_added(path)
Beispiel #3
0
 def modified_datetime(self, path):
     return self._items[normalize(path)].get('mtime', 1473339041.0)
Beispiel #4
0
 def size_bytes(self, path):
     return self._items[normalize(path)].get('size', 1)
Beispiel #5
0
 def exists(self, path):
     return normalize(path) in self._items