예제 #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)
예제 #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)
예제 #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)