Class LocalDiskStorage
Local disk file storage implementation.
Inheritance
System.Object
LocalDiskStorage
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Assembly: Bayat.SaveSystem.Runtime.dll
Syntax
public class LocalDiskStorage : StorageBase, IStorage
Constructors
|
Improve this Doc
View Source
LocalDiskStorage(String)
Declaration
public LocalDiskStorage(string basePath)
Parameters
Type |
Name |
Description |
System.String |
basePath |
|
Fields
|
Improve this Doc
View Source
basePath
Declaration
protected string basePath
Field Value
Type |
Description |
System.String |
|
Properties
|
Improve this Doc
View Source
BasePath
Declaration
public virtual string BasePath { get; set; }
Property Value
Type |
Description |
System.String |
|
|
Improve this Doc
View Source
TemporarySuffix
Declaration
public virtual string TemporarySuffix { get; }
Property Value
Type |
Description |
System.String |
|
Methods
|
Improve this Doc
View Source
Clear()
Declaration
public override async Task<StorageClearOperationResult> Clear()
Returns
Overrides
|
Improve this Doc
View Source
CommitWriteStreamInternal(IStorageStream)
Declaration
protected override Task CommitWriteStreamInternal(IStorageStream stream)
Parameters
Returns
Type |
Description |
System.Threading.Tasks.Task |
|
Overrides
|
Improve this Doc
View Source
CopyInternal(String, String, Boolean)
Declaration
protected override async Task<StorageCopyOperationResult> CopyInternal(string fromIdentifier, string toIdentifier, bool replace)
Parameters
Type |
Name |
Description |
System.String |
fromIdentifier |
|
System.String |
toIdentifier |
|
System.Boolean |
replace |
|
Returns
Overrides
|
Improve this Doc
View Source
DeleteInternal(String)
Declaration
protected override Task<StorageDeleteOperationResult> DeleteInternal(string identifier)
Parameters
Type |
Name |
Description |
System.String |
identifier |
|
Returns
Overrides
|
Improve this Doc
View Source
Exists(String)
Declaration
public override Task<bool> Exists(string identifier)
Parameters
Type |
Name |
Description |
System.String |
identifier |
|
Returns
Type |
Description |
System.Threading.Tasks.Task<System.Boolean> |
|
Overrides
|
Improve this Doc
View Source
GetAbsolutePath(String)
Gets the absolute path for the specified identifier using the base path.
Declaration
public virtual string GetAbsolutePath(string identifier)
Parameters
Type |
Name |
Description |
System.String |
identifier |
The item identifier
|
Returns
Type |
Description |
System.String |
The absolute path to the file
|
|
Improve this Doc
View Source
GetReadStream(String)
Declaration
public override Task<IStorageStream> GetReadStream(string identifier)
Parameters
Type |
Name |
Description |
System.String |
identifier |
|
Returns
Overrides
|
Improve this Doc
View Source
GetRelativePath(String, String)
Creates a relative path from one file or folder to another.
Declaration
public static string GetRelativePath(string fromPath, string toPath)
Parameters
Type |
Name |
Description |
System.String |
fromPath |
Contains the directory that defines the start of the relative path.
|
System.String |
toPath |
Contains the path that defines the endpoint of the relative path.
|
Returns
Type |
Description |
System.String |
The relative path from the start directory to the end path or toPath if the paths are not related.
|
Exceptions
Type |
Condition |
System.ArgumentNullException |
|
System.UriFormatException |
|
System.InvalidOperationException |
|
|
Improve this Doc
View Source
GetWriteStream(String)
Declaration
public override Task<IStorageStream> GetWriteStream(string identifier)
Parameters
Type |
Name |
Description |
System.String |
identifier |
|
Returns
Overrides
|
Improve this Doc
View Source
List(String, StorageListOptions)
Declaration
public override Task<string[]> List(string identifier, StorageListOptions options)
Parameters
Returns
Type |
Description |
System.Threading.Tasks.Task<System.String[]> |
|
Overrides
|
Improve this Doc
View Source
ListAll()
Declaration
public override Task<string[]> ListAll()
Returns
Type |
Description |
System.Threading.Tasks.Task<System.String[]> |
|
Overrides
|
Improve this Doc
View Source
MoveInternal(String, String, Boolean)
Declaration
protected override async Task<StorageMoveOperationResult> MoveInternal(string oldIdentifier, string newIdentifier, bool replace)
Parameters
Type |
Name |
Description |
System.String |
oldIdentifier |
|
System.String |
newIdentifier |
|
System.Boolean |
replace |
|
Returns
Overrides
|
Improve this Doc
View Source
ReadAllBytes(String)
Declaration
public override Task<byte[]> ReadAllBytes(string identifier)
Parameters
Type |
Name |
Description |
System.String |
identifier |
|
Returns
Type |
Description |
System.Threading.Tasks.Task<System.Byte[]> |
|
Overrides
|
Improve this Doc
View Source
ReadAllText(String)
Declaration
public override Task<string> ReadAllText(string identifier)
Parameters
Type |
Name |
Description |
System.String |
identifier |
|
Returns
Type |
Description |
System.Threading.Tasks.Task<System.String> |
|
Overrides
|
Improve this Doc
View Source
WriteAllBytesInternal(String, Byte[])
Declaration
protected override Task WriteAllBytesInternal(string identifier, byte[] data)
Parameters
Type |
Name |
Description |
System.String |
identifier |
|
System.Byte[] |
data |
|
Returns
Type |
Description |
System.Threading.Tasks.Task |
|
Overrides
|
Improve this Doc
View Source
WriteAllTextInternal(String, String)
Declaration
protected override Task WriteAllTextInternal(string identifier, string data)
Parameters
Type |
Name |
Description |
System.String |
identifier |
|
System.String |
data |
|
Returns
Type |
Description |
System.Threading.Tasks.Task |
|
Overrides
Implements