google-chrome-extension - 是否有 API/方法可以以编程方式获取 chromebook 中的可用磁盘大小?

标签 google-chrome-extension google-chrome-app google-chrome-os

我将文件(视频/图像)存储在 chrome book 的本地文件夹中,我想存储这些文件直到达到一定的磁盘空间并删除这些文件。有没有办法在 Chrome 操作系统中以编程方式获取磁盘空间?

我检查了https://developer.chrome.com/extensions/system_storage但这些是用于外部存储设备的。

最佳答案

我相信chrome.system.storage.可以帮助您,请注意 StorageUnitInfo.type 具有以下枚举,而 fixed 是您想要的。

  • fixed

    The storage has fixed media, e.g. hard disk or SSD.

  • removable

    The storage is removable, e.g. USB flash drive.

  • unknown

    The storage type is unknown.

关于google-chrome-extension - 是否有 API/方法可以以编程方式获取 chromebook 中的可用磁盘大小?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36848970/

相关文章:

javascript - Chrome 扩展 - 将对象从页面传递到上下文脚本

javascript - Chrome 扩展程序弹出窗口不起作用,点击事件未处理

javascript - 构建仅用于 Chrome 应用程序的开发和运行时的 Vue

javascript - 将输入从 HTML 传递到 JS

google-chrome-os - Google 键盘上的插入模式

javascript - 添加一个在用户更改选项卡时触发的监听器

javascript - 如何监控扩展/插件请求?

google-chrome-app - 应用程序未显示在 Chrome 网上应用店的搜索中

drop-down-menu - Cloud9 IDE 主菜单栏(文件、编辑、运行等)卡在最小化?

linux - Chrome 操作系统上的 HIDS 代理