Show / Hide Table of Contents

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
Implements
IFileStorage
Namespace: Eco.Core.FileStorage
Assembly: Eco.Core.dll
Syntax
public class AbsolutePathAwareStorage : Object, IFileStorage

Constructors

AbsolutePathAwareStorage(IFileStorage)

Declaration
public AbsolutePathAwareStorage(IFileStorage storage)
Parameters
Type Name Description
IFileStorage storage

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
Type Description
System.Threading.Tasks.Task<IFileStorage>

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
Type Description
System.Threading.Tasks.Task<System.Collections.Generic.IEnumerable<FileStorageDirectoryInfo>>

GetDirectory(String)

Declaration
public IFileStorage GetDirectory(string dirName)
Parameters
Type Name Description
System.String dirName
Returns
Type Description
IFileStorage

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

IFileStorage

Extension Methods

PropertyChanges.FirePropertyChanged(Object, String)
PropertyChanges.FirePropertyChanged(Object, String, Object, Object)
PropertyChanges.FirePropertyChanged(Object, MemberChangedBeforeAfterEventArgs)
☀
☾
In This Article
Back to top
Copyright (c) Strange Loop Games 2021
☀
☾