def upload(self, fileobj, bucket, key, transfer_config=None, subscribers=None): ''' upload a file using Aspera ''' check_io_access(fileobj, os.R_OK, True) return self._queue_task(bucket, [FilePair(key, fileobj)], transfer_config, subscribers, enumAsperaDirection.SEND)
def download(self, bucket, key, fileobj, transfer_config=None, subscribers=None): ''' download a file using Aspera ''' check_io_access(os.path.dirname(fileobj), os.W_OK) return self._queue_task(bucket, [FilePair(key, fileobj)], transfer_config, subscribers, enumAsperaDirection.RECEIVE)
def download_directory(self, bucket, key, directory, transfer_config=None, subscribers=None): ''' download a directory using Aspera ''' check_io_access(directory, os.W_OK) return self._queue_task(bucket, [FilePair(key, directory)], transfer_config, subscribers, enumAsperaDirection.RECEIVE)