Package | flash.filesystem |
Class | public final class StorageVolumeInfo |
Inheritance | StorageVolumeInfo EventDispatcher Object |
Language Version: | ActionScript 3.0 |
Runtime Versions: | AIR 2 |
StorageVolume.storageVolume
static property references the singleton StorageVolumeInfo object, which dispatches
the events. The StorageVolumeInfo class also defines a getStorageVolumes
method for listing currently mounted storage volumes.
On modern Linux distributions, the StorageVolumeInfo object only dispatches storageVolumeMount
and
storageVolumeUnmount
events for physical devices and network drives mounted at particular locations.
Property | Defined By | ||
---|---|---|---|
constructor : Object
A reference to the class object or constructor function for a given object instance. | Object | ||
isSupported : Boolean [static] [read-only]
The isSupported property is set to true if the
StorageVolumeInfo class is supported on the current platform, otherwise it is
set to false. | StorageVolumeInfo | ||
prototype : Object [static]
A reference to the prototype object of a class or function object. | Object | ||
storageVolumeInfo : StorageVolumeInfo [static] [read-only]
The singleton instance of the StorageVolumeInfo object. | StorageVolumeInfo |
Method | Defined By | ||
---|---|---|---|
addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
Registers an event listener object with an EventDispatcher object so that the listener
receives notification of an event. | EventDispatcher | ||
Dispatches an event into the event flow. | EventDispatcher | ||
Returns vector of StorageVolume objects corresponding to the currently mounted storage volumes. | StorageVolumeInfo | ||
Checks whether the EventDispatcher object has any listeners registered for a specific type
of event. | EventDispatcher | ||
Indicates whether an object has a specified property defined. | Object | ||
Indicates whether an instance of the Object class is in the prototype chain of the object specified
as the parameter. | Object | ||
Indicates whether the specified property exists and is enumerable. | Object | ||
Removes a listener from the EventDispatcher object. | EventDispatcher | ||
Sets the availability of a dynamic property for loop operations. | Object | ||
Returns the string representation of this object, formatted according to locale-specific conventions. | Object | ||
Returns the string representation of the specified object. | Object | ||
Returns the primitive value of the specified object. | Object | ||
Checks whether an event listener is registered with this EventDispatcher object or any of
its ancestors for the specified event type. | EventDispatcher |
Event | Summary | Defined By | ||
---|---|---|---|---|
[broadcast event] Dispatched when the Flash Player or AIR application gains operating system focus and becomes active. | EventDispatcher | |||
[broadcast event] Dispatched when the Flash Player or AIR application operating loses system focus and is becoming inactive. | EventDispatcher | |||
Dispatched when a storage volume has been mounted. | StorageVolumeInfo | |||
Dispatched when a storage volume has been unmounted. | StorageVolumeInfo |
isSupported | property |
isSupported:Boolean
[read-only] Language Version: | ActionScript 3.0 |
Runtime Versions: | AIR 2 |
The isSupported
property is set to true
if the
StorageVolumeInfo class is supported on the current platform, otherwise it is
set to false
.
Implementation
public static function get isSupported():Boolean
storageVolumeInfo | property |
storageVolumeInfo:StorageVolumeInfo
[read-only] Language Version: | ActionScript 3.0 |
Runtime Versions: | AIR 2 |
The singleton instance of the StorageVolumeInfo object. Register event listeners
on this object for the storageVolumeMount
and storageVolumeUnmount
events.
Implementation
public static function get storageVolumeInfo():StorageVolumeInfo
getStorageVolumes | () | method |
public function getStorageVolumes():Vector.<StorageVolume>
Language Version: | ActionScript 3.0 |
Runtime Versions: | AIR 2 |
Returns vector of StorageVolume objects corresponding to the currently mounted storage volumes.
On modern Linux distributions, this method returns objects corresponding to physical devices and network drives mounted at particular locations.
ReturnsVector.<StorageVolume> |
See also
Example ( How to use this example )
var volumes:Vector.<StorageVolume> = new Vector.<StorageVolume>; volumes = StorageVolumeInfo.storageVolumeInfo.getStorageVolumes(); for (var i:int = 0; i < volumes.length; i++) { trace(volumes[i].rootDirectory.nativePath); }
storageVolumeMount | Event |
flash.events.StorageVolumeChangeEvent
property StorageVolumeChangeEvent.type =
flash.events.StorageVolumeChangeEvent.STORAGE_VOLUME_MOUNT
Language Version: | ActionScript 3.0 |
Runtime Versions: | AIR 2 |
Dispatched when a storage volume has been mounted.
On modern Linux distributions, the StorageVolumeInfo object only dispatches storageVolumeMount
and
storageVolumeUnmount
events for physical devices and network drives mounted at particular locations.
StorageVolumeChangeEvent.VOLUME_MOUNT
constant defines the value of the
type
property of a StorageVolumeChangeEvent when a volume is mounted.
The event has the following properties:
Property | Value |
---|---|
bubbles | false |
cancelable | false ; there is no default behavior to cancel. |
currentTarget | The StorageVolumeChangeEvent object. |
file | A File object representing the storage volume. |
name | The name of the storage volume. |
target | The StorageVolumeChangeEvent object. |
type | "storageVolumeMount" |
storageVolumeUnmount | Event |
flash.events.StorageVolumeChangeEvent
property StorageVolumeChangeEvent.type =
flash.events.StorageVolumeChangeEvent.STORAGE_VOLUME_UNMOUNT
Language Version: | ActionScript 3.0 |
Runtime Versions: | AIR 2 |
Dispatched when a storage volume has been unmounted.
On modern Linux distributions, the StorageVolumeInfo object only dispatches storageVolumeMount
and
storageVolumeUnmount
events for physical devices and network drives mounted at particular locations.
StorageVolumeChangeEvent.VOLUME_MOUNT
constant defines the value of the
type
property of a StorageVolumeChangeEvent when a volume is unmounted.
The event has the following properties:
Property | Value |
---|---|
bubbles | false |
cancelable | false ; there is no default behavior to cancel. |
currentTarget | The StorageVolumeChangeEvent object. |
file | A File object representing the storage volume. |
name | The name of the storage volume. |
target | The StorageVolumeChangeEvent object. |
type | "storageVolumeUnmount" |
Thu May 20 2010, 02:19 AM -07:00