Product Overview
Feature Description
Product Strengths
Use Cases
Basic Concept
API | Operation Description |
Batch rename or move directories or files |
QCloudSMHBatchMoveRequest *req = [QCloudSMHBatchMoveRequest new];req.spaceId = @"spaceId";req.libraryId = @"libraryId";QCloudSMHBatchMoveInfo *info = [QCloudSMHBatchMoveInfo new];// original pathinfo.from = @"from";// target pathinfo.to = @"target";// whether move permissioninfo.moveAuthority = YES;// Filename conflicts with target path resolution policyinfo.conflictStrategy = QCloudSMHConflictStrategyEnumRename;req.batchInfos = @[info];[req setFinishBlock:^(QCloudSMHBatchResult *result, NSError * _Nullable error) {//if it is a sync task, obtain the task status from the http status codeQCloudSMHBatchTaskStatus status = QCloudSMHBatchTaskStatusTypeFromStatus([result __originHTTPURLResponse__].statusCode);result.status = status;if(status != QCloudSMHBatchTaskStatusWating || error){// End when task status is not wait or there is an errorif(self.finishBlock){self.finishBlock(result, error);}}else{// Use the returned taskid to poll task statusresult.taskId;}}];[[QCloudSMHService defaultSMHService]batchMove:req];
QCloudGetTaskStatusRequest *req = [QCloudGetTaskStatusRequest new];req.spaceId = @"spaceId";req.libraryId = @"libraryId";// taskId returned from the previous stepreq.taskIdList = @[taskId];[req setFinishBlock:^(NSArray * _Nonnull result, NSError * _Nonnull error) {}];[[QCloudSMHService defaultSMHService] getTaskStatus:req];
QCloudSMHMoveObjectRequest *req = [QCloudSMHMoveObjectRequest new];req.spaceId = @"spaceId";req.libraryId = @"libraryId";QCloudSMHBatchMoveInfo *info = [QCloudSMHBatchMoveInfo new];// original pathinfo.from = @"from";// target pathinfo.to = @"target";// whether move permissioninfo.moveAuthority = YES;// Filename conflicts with target path resolution policyinfo.conflictStrategy = QCloudSMHConflictStrategyEnumRename;req.batchInfos = @[info];[req setFinishBlock:^(QCloudSMHBatchResult *result, NSError *_Nullable error) {}];[[QCloudSMHService defaultSMHService] moveObject:req];
Apakah halaman ini membantu?
Anda juga dapat Menghubungi Penjualan atau Mengirimkan Tiket untuk meminta bantuan.
masukan