Definition
- Namespace:
- Tizen.System
- Assembly:
- Tizen.System.Storage.dll
The class to access the storage device information.
- Inheritance
-
Properties
View Source
AvailableSpace
The available storage size in bytes. The type of value is ulong.
Declaration
public ulong AvailableSpace { get; }
Property Value
View Source
AvaliableSpace
[Obsolete("Please do not use! this will be deprecated")]
Declaration
[Obsolete("Please do not use! This will be deprecated! Please use AvailableSpace instead!")]
public ulong AvaliableSpace { get; }
Property Value
View Source
DeviceType
The StorageDevice. It indicates information such as sdcard or USB storage.
Declaration
public StorageDevice DeviceType { get; }
Property Value
Exceptions
| Type |
Condition |
| System.InvalidOperationException |
Thrown when DeviceType is not initialized.
|
View Source
Flags
The flags for the storage status. It is a piece of information representing storage.
Declaration
public int Flags { get; }
Property Value
Exceptions
| Type |
Condition |
| System.InvalidOperationException |
Thrown when flags are not initialized.
|
View Source
Fstype
The type of file system. For example, it can be ext3 or ext4.
Declaration
public string Fstype { get; }
Property Value
Exceptions
| Type |
Condition |
| System.InvalidOperationException |
Thrown when Fstype is not initialized.
|
View Source
Fsuuid
The UUID of the file system. It is a unique value that serves as immutable identifier.
Declaration
public string Fsuuid { get; }
Property Value
Exceptions
| Type |
Condition |
| System.InvalidOperationException |
Thrown when Fsuuid is not initialized.
|
View Source
Id
The storage ID. It is the identifier used to determine whether the corresponding storage is internal or external.
Declaration
Property Value
View Source
Primary
Information whether this is a primary partition or not.
Declaration
public bool Primary { get; }
Property Value
Exceptions
| Type |
Condition |
| System.InvalidOperationException |
Thrown when primary is not initialized.
|
View Source
RootDirectory
The root directory for the storage. It generally has an absolute path.
Declaration
public string RootDirectory { get; }
Property Value
View Source
State
The StorageState. It contains information about the mounted state of the storage.
Declaration
public StorageState State { get; }
Property Value
View Source
StorageType
The type of storage. It has one of three values: internal, external or extended internal.
Declaration
public StorageArea StorageType { get; }
Property Value
View Source
TotalSpace
The total storage space in bytes. The type of value is ulong.
Declaration
public ulong TotalSpace { get; }
Property Value
Methods
View Source
GetAbsolutePath(DirectoryType)
Gets the absolute path to the root directory of the given storage.
Declaration
public string GetAbsolutePath(DirectoryType dirType)
Parameters
Returns
| Type |
Description |
| string |
Absolute path for a given directory type in the storage.
|
Examples
// To get the video directories for all the supported storage,
var storageList = StorageManager.Storages as List<Storage>;
foreach (var storage in storageList)
{
string pathForVideoDir = storage.GetAbsolutePath(DirectoryType.Videos);
}
Exceptions
| Type |
Condition |
| System.ArgumentException |
Thrown when failed because of an invalid argument.
|
| System.OutOfMemoryException |
Thrown when failed due to out of memory exception.
|
| System.NotSupportedException |
Thrown when the storage is not supported or the application does not have the permission to access the directory path.
|
Events
View Source
StorageStateChanged
StorageStateChanged event. This event is occurred when a storage state changes.
Declaration
public event EventHandler StorageStateChanged
Event Type
| Type |
Description |
| System.EventHandler |
|
Examples
myStorage.StorageStateChanged += (s, e) =>
{
var storage = s as Storage;
Console.WriteLine(string.Format("State Changed to {0}", storage.State));
}