0
0

More than 3 years have passed since last update.

HUAWEI Driveの容量を調べる手順

  1. HUAWEI Driveに接続する
  2. HUAWEI Driveの情報を取得する
  3. 取得した情報から、容量の項目を選ぶ

HUAWEI Driveの情報を取得するサンプル

private var drive: Drive? = null

val about = drive?.about()?.get()?.setFields("*")?.execute()

容量を取得するサンプル

// ドライブ容量
val total = about.storageQuota.userCapacity
// 使用済み容量
val used = about.storageQuota.usedSpace
// ドライブ空き容量
val free = total - used

GitHub

HMS Drive Kit Demo : https://github.com/Rei2020GitHub/MyPublicProject/tree/master/DriveKitDemo

参考

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0