Mab.PipelineFramework.FileStorage.Abstractions
1.0.2
dotnet add package Mab.PipelineFramework.FileStorage.Abstractions --version 1.0.2
NuGet\Install-Package Mab.PipelineFramework.FileStorage.Abstractions -Version 1.0.2
<PackageReference Include="Mab.PipelineFramework.FileStorage.Abstractions" Version="1.0.2" />
<PackageVersion Include="Mab.PipelineFramework.FileStorage.Abstractions" Version="1.0.2" />
<PackageReference Include="Mab.PipelineFramework.FileStorage.Abstractions" />
paket add Mab.PipelineFramework.FileStorage.Abstractions --version 1.0.2
#r "nuget: Mab.PipelineFramework.FileStorage.Abstractions, 1.0.2"
#:package Mab.PipelineFramework.FileStorage.Abstractions@1.0.2
#addin nuget:?package=Mab.PipelineFramework.FileStorage.Abstractions&version=1.0.2
#tool nuget:?package=Mab.PipelineFramework.FileStorage.Abstractions&version=1.0.2
Mab.PipelineFramework.FileStorage.Abstractions
Abstractions for virtual file storage operations. Provides a unified IFileStore interface for file operations across different storage backends.
Installation
dotnet add package Mab.PipelineFramework.FileStorage.Abstractions
Key Interfaces
IFileStore
The main interface for file storage operations:
public interface IFileStore
{
Task<IFileStoreEntry?> GetFileInfoAsync(string path);
Task<IFileStoreEntry?> GetDirectoryInfoAsync(string path);
IAsyncEnumerable<IFileStoreEntry> GetDirectoryContentAsync(string? path = null, bool includeSubDirectories = false);
Task<bool> TryCreateDirectoryAsync(string path);
Task<bool> TryDeleteFileAsync(string path);
Task<bool> TryDeleteDirectoryAsync(string path);
Task MoveFileAsync(string oldPath, string newPath);
Task CopyFileAsync(string srcPath, string dstPath);
Task<Stream> GetFileStreamAsync(string path);
Task<string> CreateFileFromStreamAsync(string path, Stream inputStream, bool overwrite = false);
}
IFileStoreEntry
Represents a file or directory entry:
public interface IFileStoreEntry
{
string Path { get; }
string Name { get; }
string DirectoryPath { get; }
long Length { get; }
DateTime LastModifiedUtc { get; }
bool IsDirectory { get; }
}
IClock
Testable time abstraction:
public interface IClock
{
DateTime UtcNow { get; }
}
// Default implementation
public class SystemClock : IClock
{
public static readonly IClock Instance = new SystemClock();
public DateTime UtcNow => DateTime.UtcNow;
}
Available Implementations
- Mab.PipelineFramework.FileStorage.FileSystem - Local file system
- Mab.PipelineFramework.FileStorage.AmazonS3 - AWS S3
License
MIT
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- No dependencies.
NuGet packages (3)
Showing the top 3 NuGet packages that depend on Mab.PipelineFramework.FileStorage.Abstractions:
| Package | Downloads |
|---|---|
|
Mab.PipelineFramework.FileStorage.S3
S3-compatible storage implementation for PipelineFramework.FileStorage. Supports AWS S3, Cloudflare R2, MinIO, and other S3-compatible services using the MinIO .NET SDK. |
|
|
Mab.PipelineFramework.FileStorage.FileSystem
Local file system implementation for PipelineFramework.FileStorage. Provides IFileStore implementation for physical file system operations. |
|
|
Mab.PipelineFramework.FileStorage.AmazonS3
Amazon S3 implementation for PipelineFramework.FileStorage. Provides IFileStore implementation for AWS S3 bucket operations. |
GitHub repositories
This package is not used by any popular GitHub repositories.