Skip to main content

Class StaticFilesRepository

Namespace: Aurigma.DesignAtoms.Storage.Repositories​
Assembly: Aurigma.DesignAtoms.dll​
Syntax
public class StaticFilesRepository : IStaticFilesRepository, IFileRepository

Inheritance: System.Object -> StaticFilesRepository

Implements​

Inherited Members​

  • System.Object.ToString
  • System.Object.Equals(System.Object)
  • System.Object.Equals(System.Object,System.Object)
  • System.Object.ReferenceEquals(System.Object,System.Object)
  • System.Object.GetHashCode
  • System.Object.GetType
  • System.Object.MemberwiseClone

Constructors​

StaticFilesRepository​

public StaticFilesRepository(IStorageFactory storageFactory)

Methods​

GetFileContent​

public Stream GetFileContent(string id)
Parameters​
TypeNameDescription
System.Stringid
Returns​

System.IO.Stream

GetFileContentAsync​

public ValueTask<Stream> GetFileContentAsync(string id)
Parameters​
TypeNameDescription
System.Stringid
Returns​

System.Threading.Tasks.ValueTask<System.IO.Stream>

GetFileInfoAsync​

public Task<StorageFileInfoModel> GetFileInfoAsync(string id)
Parameters​
TypeNameDescription
System.Stringid
Returns​

System.Threading.Tasks.Task<Aurigma.DesignAtoms.Storages.Abstractions.Models.StorageFileInfoModel>

GetFileInfo​

public StorageFileInfoModel GetFileInfo(string fileId)
Parameters​
TypeNameDescription
System.StringfileId
Returns​

Aurigma.DesignAtoms.Storages.Abstractions.Models.StorageFileInfoModel

AddFile​

public StorageFileInfoModel AddFile(string id, Stream fileContent)
Parameters​
TypeNameDescription
System.Stringid
System.IO.StreamfileContent
Returns​

Aurigma.DesignAtoms.Storages.Abstractions.Models.StorageFileInfoModel

AddFileAsync​

public Task<StorageFileInfoModel> AddFileAsync(string path, Stream fileContent)
Parameters​
TypeNameDescription
System.Stringpath
System.IO.StreamfileContent
Returns​

System.Threading.Tasks.Task<Aurigma.DesignAtoms.Storages.Abstractions.Models.StorageFileInfoModel>

AddFileAsync​

public Task<StorageFileInfoModel> AddFileAsync(Stream fileContent)
Parameters​
TypeNameDescription
System.IO.StreamfileContent
Returns​

System.Threading.Tasks.Task<Aurigma.DesignAtoms.Storages.Abstractions.Models.StorageFileInfoModel>

AddFile​

public StorageFileInfoModel AddFile(Stream fileContent)
Parameters​
TypeNameDescription
System.IO.StreamfileContent
Returns​

Aurigma.DesignAtoms.Storages.Abstractions.Models.StorageFileInfoModel

AddFileWithExtension​

public StorageFileInfoModel AddFileWithExtension(string extension, Stream fileContent)
Parameters​
TypeNameDescription
System.Stringextension
System.IO.StreamfileContent
Returns​

Aurigma.DesignAtoms.Storages.Abstractions.Models.StorageFileInfoModel

AddFileWithExtensionAsync​

public Task<StorageFileInfoModel> AddFileWithExtensionAsync(string extension, Stream fileContent)
Parameters​
TypeNameDescription
System.Stringextension
System.IO.StreamfileContent
Returns​

System.Threading.Tasks.Task<Aurigma.DesignAtoms.Storages.Abstractions.Models.StorageFileInfoModel>

RemoveFileAsync​

public Task<StorageFileInfoModel> RemoveFileAsync(string id)
Parameters​
TypeNameDescription
System.Stringid
Returns​

System.Threading.Tasks.Task<Aurigma.DesignAtoms.Storages.Abstractions.Models.StorageFileInfoModel>

FileExistsAsync​

public ValueTask<bool> FileExistsAsync(string id)
Parameters​
TypeNameDescription
System.Stringid
Returns​

System.Threading.Tasks.ValueTask<System.Boolean>

FileExists​

public bool FileExists(string id)
Parameters​
TypeNameDescription
System.Stringid
Returns​

System.Boolean

GetFilesInfo​

public PageOfStorageFileInfoModel GetFilesInfo(FilesRequestFilter filesRequestFilter = null)
Parameters​
TypeNameDescription
Aurigma.DesignAtoms.Storages.Abstractions.Filters.FilesRequestFilterfilesRequestFilter
Returns​

Aurigma.DesignAtoms.Storages.Abstractions.Models.PageOfStorageFileInfoModel

RemoveFile​

public StorageFileInfoModel RemoveFile(string fileId)
Parameters​
TypeNameDescription
System.StringfileId
Returns​

Aurigma.DesignAtoms.Storages.Abstractions.Models.StorageFileInfoModel

RemoveFilesByPrefixAsync​

public Task<IEnumerable<StorageFileInfoModel>> RemoveFilesByPrefixAsync(string prefix)
Parameters​
TypeNameDescription
System.Stringprefix
Returns​

System.Threading.Tasks.Task<System.Collections.Generic.IEnumerable<Aurigma.DesignAtoms.Storages.Abstractions.Models.StorageFileInfoModel>>

RemoveFilesByPrefix​

public IEnumerable<StorageFileInfoModel> RemoveFilesByPrefix(string prefix)
Parameters​
TypeNameDescription
System.Stringprefix
Returns​

System.Collections.Generic.IEnumerable<Aurigma.DesignAtoms.Storages.Abstractions.Models.StorageFileInfoModel>

GetStorageInfo​

public StorageInfoModel GetStorageInfo()
Returns​

Aurigma.DesignAtoms.Storages.Abstractions.Models.StorageInfoModel

Was this page helpful?