tencent cloud

Smart Media Hosting

Product Introduction
Product Overview
Feature Description
Product Strengths
Use Cases
Basic Concept
Purchase Guide
Quick Start
Create Media Library
Initiate request
Service Level API Document
History
Introduction
API Category
Making API Requests
PaaS Service APIs
Official Cloud Disk APIs
Data Types
Error Codes
Business Level API Document
Introduction
Access Token Operation API
Tenant Space Operation API
File Operation API
Directory or Album Operation API
Recycle Bin Operation API
Quota Operation API
Query Task Operation API
Search Operation API
Historical Version Operations API
Directory and File Batch Operation API
Collection Operation API
Error Codes
SDK Documentation
Android SDK
iOS SDK
HarmonyOS SDK
FAQs
Enterprise Network Disk
Product Introduction
Purchase Guide
Quick Start
FAQs
Service Level Agreement
Glossary

Rename Folder

PDF
フォーカスモード
フォントサイズ
最終更新日: 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];


ヘルプとサポート

この記事はお役に立ちましたか?

フィードバック