Class SimpleFilesystemProvider
- Namespace
- Akavache
- Assembly
- Akavache.Core.dll
A wrapper around the file system.
public class SimpleFilesystemProvider : IFilesystemProvider
- Inheritance
-
SimpleFilesystemProvider
- Implements
- Extension Methods
Constructors
SimpleFilesystemProvider()
public SimpleFilesystemProvider()
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).
public IObservable<Unit> CreateRecursive(string path)
Parameters
path
stringThe path to create.
Returns
- IObservable<Unit>
A observable which signals when the create is finished.
Delete(string)
Deletes a file.
public IObservable<Unit> Delete(string path)
Parameters
path
stringThe path to the file.
Returns
- IObservable<Unit>
A observable which signals when the delete is finished.
GetAssemblyDirectoryName()
Gets the assembly directory name.
protected static string GetAssemblyDirectoryName()
Returns
- string
The assembly directory name.
GetDefaultLocalMachineCacheDirectory()
Gets the default local machine cache directory (i.e. the one for temporary data).
public string GetDefaultLocalMachineCacheDirectory()
Returns
- string
The default local machine cache directory.
GetDefaultRoamingCacheDirectory()
Gets the default roaming cache directory (i.e. the one for user settings).
public string GetDefaultRoamingCacheDirectory()
Returns
- string
The default roaming cache directory.
GetDefaultSecretCacheDirectory()
Gets the default roaming cache directory (i.e. the one for user settings).
public string GetDefaultSecretCacheDirectory()
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).
public IObservable<Stream> OpenFileForReadAsync(string path, IScheduler scheduler)
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).
public IObservable<Stream> OpenFileForWriteAsync(string path, IScheduler scheduler)
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.