Interface IFilesystemProvider
- Namespace
- Akavache
- Assembly
- Akavache.Core.dll
An abstraction for the simple file operations that an IBlobCache can perform. Create a new instance of this when adapting IBlobCache to different platforms or backing stores, or for testing purposes.
- Extension Methods
Methods
CreateRecursive(string)
Create a directory and its parents. If the directory already exists, this method does nothing (i.e. it does not throw if a directory exists).
Parameters
path
stringThe path to create.
Returns
- IObservable<Unit>
A observable which signals when the create is finished.
Delete(string)
Deletes a file.
Parameters
path
stringThe path to the file.
Returns
- IObservable<Unit>
A observable which signals when the delete is finished.
GetDefaultLocalMachineCacheDirectory()
Gets the default local machine cache directory (i.e. the one for temporary data).
Returns
- string
The default local machine cache directory.
GetDefaultRoamingCacheDirectory()
Gets the default roaming cache directory (i.e. the one for user settings).
Returns
- string
The default roaming cache directory.
GetDefaultSecretCacheDirectory()
Gets the default roaming cache directory (i.e. the one for user settings).
Returns
- string
The default roaming cache directory.
OpenFileForReadAsync(string, IScheduler)
Open a file on a background thread, with the File object in 'async mode'. It is critical that this operation is deferred and returns immediately (i.e. wrapped in an Observable.Start).
Parameters
path
stringThe path to the file.
scheduler
ISchedulerThe scheduler to schedule the open under.
Returns
- IObservable<Stream>
A Future result representing the Open file.
OpenFileForWriteAsync(string, IScheduler)
Open a file on a background thread, with the File object in 'async mode'. It is critical that this operation is deferred and returns immediately (i.e. wrapped in an Observable.Start).
Parameters
path
stringThe path to the file.
scheduler
ISchedulerThe scheduler to schedule the open under.
Returns
- IObservable<Stream>
A Future result representing the Open file.