tencent cloud

Smart Media Hosting

Renaming a Folder

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

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()
}


도움말 및 지원

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

피드백