Class AbsolutePathAwareStorage
Checks if fileName is absolute path and uses file system in this case
otherwise it uses backing file storage.
Inheritance
System.Object
AbsolutePathAwareStorage
Assembly: Eco.Core.dll
Syntax
public class AbsolutePathAwareStorage : Object, IFileStorage
Constructors
AbsolutePathAwareStorage(IFileStorage)
Declaration
public AbsolutePathAwareStorage(IFileStorage storage)
Parameters
Properties
QualifiedName
Declaration
public string QualifiedName { get; }
Property Value
| Type |
Description |
| System.String |
|
Methods
CopyFileToAsync(String, Stream)
Declaration
public Task CopyFileToAsync(string fileName, Stream destination)
Parameters
| Type |
Name |
Description |
| System.String |
fileName |
|
| System.IO.Stream |
destination |
|
Returns
| Type |
Description |
| System.Threading.Tasks.Task |
|
CreateAsync(String, Stream)
Declaration
public Task CreateAsync(string fileName, Stream inputStream)
Parameters
| Type |
Name |
Description |
| System.String |
fileName |
|
| System.IO.Stream |
inputStream |
|
Returns
| Type |
Description |
| System.Threading.Tasks.Task |
|
CreateDirectoryAsync(String)
Declaration
public Task<IFileStorage> CreateDirectoryAsync(string dirName)
Parameters
| Type |
Name |
Description |
| System.String |
dirName |
|
Returns
DeleteDirectoryAsync(String)
Declaration
public Task DeleteDirectoryAsync(string dirName)
Parameters
| Type |
Name |
Description |
| System.String |
dirName |
|
Returns
| Type |
Description |
| System.Threading.Tasks.Task |
|
DeleteFileAsync(String)
Declaration
public Task DeleteFileAsync(string fileName)
Parameters
| Type |
Name |
Description |
| System.String |
fileName |
|
Returns
| Type |
Description |
| System.Threading.Tasks.Task |
|
DirectoryExistsAsync(String)
Declaration
public Task<bool> DirectoryExistsAsync(string dirName)
Parameters
| Type |
Name |
Description |
| System.String |
dirName |
|
Returns
| Type |
Description |
| System.Threading.Tasks.Task<System.Boolean> |
|
ExistsAsync()
Declaration
public Task<bool> ExistsAsync()
Returns
| Type |
Description |
| System.Threading.Tasks.Task<System.Boolean> |
|
ExistsAsync(String)
Declaration
public Task<bool> ExistsAsync(string fileName)
Parameters
| Type |
Name |
Description |
| System.String |
fileName |
|
Returns
| Type |
Description |
| System.Threading.Tasks.Task<System.Boolean> |
|
GetDirectoriesAsync()
Declaration
public Task<IEnumerable<FileStorageDirectoryInfo>> GetDirectoriesAsync()
Returns
GetDirectory(String)
Declaration
public IFileStorage GetDirectory(string dirName)
Parameters
| Type |
Name |
Description |
| System.String |
dirName |
|
Returns
GetFileNamesAsync()
Declaration
public Task<List<string>> GetFileNamesAsync()
Returns
| Type |
Description |
| System.Threading.Tasks.Task<System.Collections.Generic.List<System.String>> |
|
GetLastWriteTimeAsync()
Declaration
public Task<DateTime> GetLastWriteTimeAsync()
Returns
| Type |
Description |
| System.Threading.Tasks.Task<System.DateTime> |
|
GetQualifiedName(String)
Declaration
public string GetQualifiedName(string name)
Parameters
| Type |
Name |
Description |
| System.String |
name |
|
Returns
| Type |
Description |
| System.String |
|
ReadAllBytes(String)
Declaration
public byte[] ReadAllBytes(string fileName)
Parameters
| Type |
Name |
Description |
| System.String |
fileName |
|
Returns
| Type |
Description |
| System.Byte[] |
|
ReadAllTextAsync(String)
Declaration
public Task<string> ReadAllTextAsync(string fileName)
Parameters
| Type |
Name |
Description |
| System.String |
fileName |
|
Returns
| Type |
Description |
| System.Threading.Tasks.Task<System.String> |
|
WriteAllTextAsync(String, String)
Declaration
public Task WriteAllTextAsync(string fileName, string contents)
Parameters
| Type |
Name |
Description |
| System.String |
fileName |
|
| System.String |
contents |
|
Returns
| Type |
Description |
| System.Threading.Tasks.Task |
|
Implements
Extension Methods