Storage
Tizen enables you to get storage information and manage directories.
The Storage API provides access to accessible parts of the file system, which are represented as virtual root locations. The virtual roots form a collection of locations that function as a single virtual device file system. The following table lists the supported virtual roots.
Virtual root | Description |
---|---|
images | Location for storing images. |
sounds | Location for storing sound files. |
videos | Location for storing videos. |
camera | Location for storing camera files. |
downloads | Location for storing downloaded items. |
music | Location for storing audio files. |
documents | Location for storing documents. |
others | Location for storing other files. |
ringtones | Location for ringtones (read-only location). |
The main features of the Storage API include:
- Storage management
You can manage different storages on the device with the Storage APIs.
You can retrieve additional information about the storages, including which storage is supported in the device using the storage_foreach_device_supported() function. The callback function returns the storage type, mount state, and virtual root path.
- Storage space management
You can get the available and total space size of the storage with the storage_get_total_space() and storage_get_available_space() functions. They return the storage size, excluding the minimum memory size to launch the low memory pop-up in case of a low memory situation. Consequently, the available size must be less than the original available size, and you must use these functions to get the memory size. For the same reason, you cannot use the statvfs function directly in Tizen. Instead, use storage_get_internal_memory_size() and storage_get_external_memory_size(). The Statvfs structure has a different structure size defined by "__USE_FILE_OFFSET64". However, you can ignore this, since the Storage API uses a proper function automatically.