Use the chrome.system.storage API to query storage device information and be notified when a removable storage device is attached and detached.
Use the chrome.system.storage API to query storage device information and be notified when a removable storage device is attached and detached. * available since Chrome 36 * https://developer.chrome.com/apps/system.storage
(eject-device id)
Ejects a removable storage device.
|id| - https://developer.chrome.com/apps/system.storage#property-ejectDevice-id.
This function returns a core.async channel of type promise-chan
which eventually receives a result value.
Signature of the result value put on the channel is [result] where:
|result| - https://developer.chrome.com/apps/system.storage#property-callback-result.
In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error.
https://developer.chrome.com/apps/system.storage#method-ejectDevice.
Ejects a removable storage device. |id| - https://developer.chrome.com/apps/system.storage#property-ejectDevice-id. This function returns a core.async channel of type `promise-chan` which eventually receives a result value. Signature of the result value put on the channel is [result] where: |result| - https://developer.chrome.com/apps/system.storage#property-callback-result. In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error. https://developer.chrome.com/apps/system.storage#method-ejectDevice.
(get-available-capacity id)
Get the available capacity of a specified |id| storage device. The |id| is the transient device ID from StorageUnitInfo.
|id| - https://developer.chrome.com/apps/system.storage#property-getAvailableCapacity-id.
This function returns a core.async channel of type promise-chan
which eventually receives a result value.
Signature of the result value put on the channel is [info] where:
|info| - https://developer.chrome.com/apps/system.storage#property-callback-info.
In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error.
https://developer.chrome.com/apps/system.storage#method-getAvailableCapacity.
Get the available capacity of a specified |id| storage device. The |id| is the transient device ID from StorageUnitInfo. |id| - https://developer.chrome.com/apps/system.storage#property-getAvailableCapacity-id. This function returns a core.async channel of type `promise-chan` which eventually receives a result value. Signature of the result value put on the channel is [info] where: |info| - https://developer.chrome.com/apps/system.storage#property-callback-info. In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error. https://developer.chrome.com/apps/system.storage#method-getAvailableCapacity.
(get-info)
Get the storage information from the system. The argument passed to the callback is an array of StorageUnitInfo objects.
This function returns a core.async channel of type promise-chan
which eventually receives a result value.
Signature of the result value put on the channel is [info] where:
|info| - https://developer.chrome.com/apps/system.storage#property-callback-info.
In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error.
https://developer.chrome.com/apps/system.storage#method-getInfo.
Get the storage information from the system. The argument passed to the callback is an array of StorageUnitInfo objects. This function returns a core.async channel of type `promise-chan` which eventually receives a result value. Signature of the result value put on the channel is [info] where: |info| - https://developer.chrome.com/apps/system.storage#property-callback-info. In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error. https://developer.chrome.com/apps/system.storage#method-getInfo.
(tap-all-events chan)
Taps all valid non-deprecated events in chromex.app.system.storage namespace.
Taps all valid non-deprecated events in chromex.app.system.storage namespace.
(tap-on-attached-events channel & args)
Fired when a new removable storage is attached to the system.
Events will be put on the |channel| with signature [::on-attached [info]] where:
|info| - https://developer.chrome.com/apps/system.storage#property-onAttached-info.
Note: |args| will be passed as additional parameters into Chrome event's .addListener call.
https://developer.chrome.com/apps/system.storage#event-onAttached.
Fired when a new removable storage is attached to the system. Events will be put on the |channel| with signature [::on-attached [info]] where: |info| - https://developer.chrome.com/apps/system.storage#property-onAttached-info. Note: |args| will be passed as additional parameters into Chrome event's .addListener call. https://developer.chrome.com/apps/system.storage#event-onAttached.
(tap-on-detached-events channel & args)
Fired when a removable storage is detached from the system.
Events will be put on the |channel| with signature [::on-detached [id]] where:
|id| - https://developer.chrome.com/apps/system.storage#property-onDetached-id.
Note: |args| will be passed as additional parameters into Chrome event's .addListener call.
https://developer.chrome.com/apps/system.storage#event-onDetached.
Fired when a removable storage is detached from the system. Events will be put on the |channel| with signature [::on-detached [id]] where: |id| - https://developer.chrome.com/apps/system.storage#property-onDetached-id. Note: |args| will be passed as additional parameters into Chrome event's .addListener call. https://developer.chrome.com/apps/system.storage#event-onDetached.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close