tencent cloud

Smart Media Hosting

Renaming a Folder

Download
聚焦模式
字号
最后更新时间: 2026-01-07 11:03:10
本文档由 AI 翻译

Introduction

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

Renaming or Moving a Directory or Album

Feature Overview

For renaming or moving a directory or album.

Example Code

//source folder
val sourceDir = Directory()
//target folder
val targetDir = Directory()

try {
val renameFileResponse: RenameFileResponse = smh.renameDirectory(
target = targetDir,
source = sourceDir,
//Filename conflict strategy
conflictStrategy = ConflictStrategy.RENAME
)
} catch (e: Exception) {
e.printStackTrace()
}


帮助和支持

本页内容是否解决了您的问题?

填写满意度调查问卷,共创更好文档体验。

文档反馈