HUAWEI Driveのファイルとフォルダの削除手順
- HUAWEI Driveに接続する
- ファイルまたはフォルダを検索し、対象のcom.huawei.cloud.services.drive.model.Fileを取得する
- HUAWEI DriveにオブジェクトのIDを渡し、削除命令を実行する
サンプル
private var drive: Drive? = null
fun deleteFile(target: com.huawei.cloud.services.drive.model.File) {
drive?.let { drive ->
val deleteFile = drive.files().delete(target.id)
deleteFile.execute()
}
}
GitHub
HMS Drive Kit Demo : https://github.com/Rei2020GitHub/MyPublicProject/tree/master/DriveKitDemo
参考
- HMS:https://developer.huawei.com/consumer/jp/
- HMS Drive Kitの紹介:https://developer.huawei.com/consumer/jp/hms/huawei-drivekit
- HMS Drive Kitのドキュメント:https://developer.huawei.com/consumer/jp/doc/development/HMSCore-Guides/introduction-0000001050039630
- Huawei Developers:https://forums.developer.huawei.com/forumPortal/en/home
- Facebook Huawei Developersグループ:https://www.facebook.com/Huaweidevs/