Class StorageManager
Definition
- Assembly:
- Tizen.System.Storage.dll
The StorageManager provides the properties or methods to access storage in the device.
public static class StorageManager
- Inheritance
-
objectStorageManager
Properties
View SourceStorages
List of all storage in the device.
Declaration
public static IEnumerable<Storage> Storages { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<T><Storage> |
Methods
View SourceSetChangedEvent(StorageArea, EventHandler)
Registers an eventhandler for state changes of specific storage type.
Declaration
public static void SetChangedEvent(StorageArea type, EventHandler handler)
Parameters
Type | Name | Description |
---|---|---|
StorageArea | type | The type of the storage. |
System.EventHandler | handler | An eventhandler to register. |
Examples
EventHandler callback = (s, e) =>
{
var storage = s as Storage;
if (storage == null) return;
};
StorageManager.SetChangedEvent(StorageArea.External, callback);
StorageManager.UnSetChangedEvent(StorageArea.External, callback);
Exceptions
Type | Condition |
---|---|
System.NotSupportedException | Thrown when the storage is not supported. |
UnsetChangedEvent(StorageArea, EventHandler)
Unregisters an eventhandler for state changes of specific storage type.
Declaration
public static void UnsetChangedEvent(StorageArea type, EventHandler handler)
Parameters
Type | Name | Description |
---|---|---|
StorageArea | type | The type of the storage. |
System.EventHandler | handler | An eventhandler to unregister. |
Exceptions
Type | Condition |
---|---|
System.NotSupportedException | Thrown when the storage is not supported. |