Пример #1
0
 def _create_pathname_operation(self, status, pathname, oldpath=None):
     """
     Factory method for PathnameOperation objects
     """
     status_to_verb = {
         'LN': 'UPLOAD',
         'LD': 'DELETE',
         'LRto': 'REMOTE_COPY',
         'RN': 'DOWNLOAD',
         'RD': 'DELETE_LOCAL'
     }
     event = self._last_event_for_pathname[pathname]
     operation = PathnameOperation(
         self.application, self.access, status_to_verb[status],
         pathname, oldpath, event.etag, event.size, event.lmtime,
         event.conflicted)
     operation.register_abort_handler(self.on_file_operation_abort)
     operation.register_complete_handler(self.on_file_operation_complete)
     return operation
Пример #2
0
 def _create_pathname_operation(self, status, pathname, oldpath=None):
     """
     Factory method for PathnameOperation objects
     """
     status_to_verb = {
         'LN': 'UPLOAD',
         'LD': 'DELETE',
         'LRto': 'REMOTE_COPY',
         'RN': 'DOWNLOAD',
         'RD': 'DELETE_LOCAL'
     }
     event = self._last_event_for_pathname[pathname]
     operation = PathnameOperation(self.application, self.access,
                                   status_to_verb[status], pathname,
                                   oldpath, event.etag, event.size,
                                   event.lmtime, event.conflicted)
     operation.register_abort_handler(self.on_file_operation_abort)
     operation.register_complete_handler(self.on_file_operation_complete)
     return operation
Пример #3
0
 def _create_pathname_operation(self, status, pathname, oldpath=None):
     """
     Factory method for PathnameOperation objects
     """
     status_to_verb = {"LN": "UPLOAD", "LD": "DELETE", "LRto": "REMOTE_COPY", "RN": "DOWNLOAD", "RD": "DELETE_LOCAL"}
     event = self._last_event_for_pathname[pathname]
     operation = PathnameOperation(
         self.application,
         self.access,
         status_to_verb[status],
         pathname,
         oldpath,
         event.etag,
         event.size,
         event.lmtime,
         event.conflicted,
     )
     operation.register_abort_handler(self.on_file_operation_abort)
     operation.register_complete_handler(self.on_file_operation_complete)
     return operation