Stay organized with collections Save and categorize content based on your preferences.
DescriptionUse the chrome.system.storage
API to query storage device information and be notified when a removable storage device is attached and detached.
system.storage
"success"
The ejection command is successful -- the application can prompt the user to remove the device.
"in_use"
The device is in use by another application. The ejection did not succeed; the user should not remove the device until the other application is done with the device.
"no_such_device"
There is no such device known.
"failure"
The ejection command failed.
The available capacity of the storage device, in bytes.
A copied id
of getAvailableCapacity function parameter id
.
The total amount of the storage space, in bytes.
The transient ID that uniquely identifies the storage device. This ID will be persistent within the same run of a single application. It will not be a persistent identifier between different runs of an application, or between different applications.
The name of the storage unit.
The media type of the storage unit.
"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.
chrome.system.storage.ejectDevice(
id: string,
): Promise<EjectDeviceResultCode>
Ejects a removable storage device.
getAvailableCapacity()chrome.system.storage.getAvailableCapacity(
id: string,
): Promise<StorageAvailableCapacityInfo>
Get the available capacity of a specified id
storage device. The id
is the transient device ID from StorageUnitInfo.
chrome.system.storage.getInfo(): Promise<StorageUnitInfo[]>
Get the storage information from the system. The argument passed to the callback is an array of StorageUnitInfo objects.
Events onAttachedchrome.system.storage.onAttached.addListener(
callback: function,
)
Fired when a new removable storage is attached to the system.
ParametersThe callback
parameter looks like:
(info: StorageUnitInfo) => void
chrome.system.storage.onDetached.addListener(
callback: function,
)
Fired when a removable storage is detached from the system.
ParametersThe callback
parameter looks like:
(id: string) => void
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-08-11 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-11 UTC."],[],[]]
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4