There are several Storage classes and they are created using the following factory functions:
- Storage::create
This function is the easiest interface to create a read-only Storage instance from a file name or an URL. This function internally uses ResourceBroker to resolve the file names and URLs.
- DiskStorage::create
This function creates a Storage instance by opening a file. It can be used for both of read and write access.
- DiskStorage::createTemp
This function creates a Storage instance by opening a temporary file.
- DiskStorage::createAnonTemp
This function creates a Storage instance by opening an anonymous temporary file. The file can be accessed only with this Storage instance and no other one could not open the same file.
The Storage instance removes the file if the instance is about to be removed.
- DiskStorageWithRollback::create
This function creates a StorageWithRollback instance by opening a file. It can be used for both of read and write access. For write access, unlike other Storage classes, StorageWithRollback provides rollback function. For more information, see StorageWithRollback.
- MemoryStorage::create
This function creates a Storage instance based on SimpleArray instance. You can access to the memory array as if it were a file. It can be used for both of read and write access.
- RomStorage::create
This function creates a Storage instance based on read only memory block. The Storage instance created is only for read access.
- HttpManager::createHttpStorage
This function creates a Storage instance by opening a file on the internet. Currently, "http" and "https" protocols are supported by this function.
- StorageOffsetter::create
This function creates a Storage instance from an existing Storage instance. The new one is almost identical to the original one except the offset address is started from the position you've specified on the creation.
- See Also
- Storage, StorageRollback, Stream