tencent cloud

Smart Media Hosting

Rename Folder

Download
포커스 모드
폰트 크기
마지막 업데이트 시간: 2026-01-07 10:49:10

Introduction

This document provides an API overview about file renaming and SDK example code.
API
Operation Description
Rename or move directory or album

SDK API Reference

For specific parameters and method descriptions of all SDK APIs, please see SDK API Reference.

Renaming or Moving a Directory or Album

Feature Description

Use to rename or move directory or album.

Sample Code

QCloudSMHRenameDirectoryRequest *req = [QCloudSMHRenameDirectoryRequest new];
// Media Library ID, required parameter
req.libraryId = self.userModel.libraryId;
// Space ID, if the media library is in single-tenant mode, this parameter is fixed as a hyphen (-); if the media library is in multi-tenant mode, you must specify this parameter
req.spaceId = scopeDir.teamInfo.spaceId;
// Directory path or album name, for multi-level directory, use slash (/) to separate, such as foo/bar
req.dirPath = name;
// Source directory path or album name to be renamed or moved
req.from = cto.object.totalPath;
req.conflictStrategy = QCloudSMHConflictStrategyEnumAsk;
// Whether to move folder permissions, true to move, false not to move;
req.moveAuthority = YES;
[req setFinishBlock:^(QCloudSMHRenameResult *result, NSError *_Nullable error) {
if (completeHandler) {
completeHandler(result, error);
}
}];
[[QCloudSMHService defaultSMHService] renameDirecotry:req];


도움말 및 지원

문제 해결에 도움이 되었나요?

피드백