Exemplo n.º 1
0
 def save(self, path):
     with open(path, 'wb') as fh:
         serialized_data = self.dump().SerializeToString()
         compressed_data = zlib.compress(serialized_data)
         fh.write(compressed_data)
         set_nzbfs_attr(path, 'size', self.file_size)
         set_nzbfs_attr(path, 'mtime', self.mtime)
     os.utime(path, (-1, self.mtime))
Exemplo n.º 2
0
 def save(self, path):
     with open(path, 'wb') as fh:
         serialized_data = self.dump().SerializeToString()
         compressed_data = zlib.compress(serialized_data)
         fh.write(compressed_data)
         set_nzbfs_attr(path, 'size', self.file_size)
         set_nzbfs_attr(path, 'mtime', self.mtime)
     os.utime(path, (-1, self.mtime))
Exemplo n.º 3
0
 def _set_attr(self, value):
     return set_nzbfs_attr(self.db_root, attr, value)