Exemple #1
0
 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)
Exemple #2
0
 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)
Exemple #3
0
 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)