dotnet add package AzureBlobAdapterAssembly --version 1.1.1
NuGet\Install-Package AzureBlobAdapterAssembly -Version 1.1.1
<PackageReference Include="AzureBlobAdapterAssembly" Version="1.1.1" />
paket add AzureBlobAdapterAssembly --version 1.1.1
#r "nuget: AzureBlobAdapterAssembly, 1.1.1"
// Install AzureBlobAdapterAssembly as a Cake Addin #addin nuget:?package=AzureBlobAdapterAssembly&version=1.1.1 // Install AzureBlobAdapterAssembly as a Cake Tool #tool nuget:?package=AzureBlobAdapterAssembly&version=1.1.1
This is an adapter for the Azure Blob Storage to integrate with the existing .NET System.IO based file system access code with little or no changes.
This library implements the interfaces of the System.IO.Abstractions package. The System.IO.Abstractions NuGet package provides a layer of abstraction over the file system that is API-compatible with the existing code. They help to make file access code more unit testable as well.
This library uses the latest version of Azure Blob SDK - version 12.x
Directories are supported via the latest version of Azure Data Lake Storage. It Combines the power of a Hadoop compatible file system with integrated hierarchical namespace with the massive scale and economy of Azure Blob Storage to help speed your transition from proof of concept to production. Refer documentation, SDK, Samples, source code.
The class library is implemented in .NET Standard 2.0. So that it will support both
- The most widely used and the legacy .NET Framework and
- the latest .NET core applications
Drives and shared folders are implemented via the containers. The drive letters and shared folders can be mounted via mount points via settings.
Differences between System.IO and AzureBlobAdapter
- This is an adapter, not an emulator. Meaning IO function calls are redirected to the Blob storage wrappers instead of file systems calls. All the method signatures are 100% compatible with the existing method declarations.
- As the internal implementations of Azure Blob SDK and System.IO Library are different, parameter validations and the exceptions thrown by blob SDK are different from the file system calls. They have to be addressed by the client applications.
- The Azure blob needs to be initialized with the connection strings and to be injected into the application via these interfaces. But the file system can be used directly
- Many functionalities of the file systems are not available with the Blob. Example: FileSystemSecurity (audits, access rules, etc).
- The advanced features in the Blob storage don't exist in file system calls. So they have to be accessed via separate interfaces and not accessible via these interfaces.
Implemented functionality summary
- Most of the time in the .NET applications, we create/update/deleting/listing files and directories. (CRUD)
- File and Directory Information - Work in progress
Implemented Interfaces and Methods
|IFileSystem||IFile, IDriveInfoFactory, IPath|
|IFile||Implemented create, append, read, delete, copy, move and rename file operations for both text and binary files. Methods for continuous Stream based create/update operations, individual file level encryption/decryption, read/change AccessControl and Attributes|
|IDirectory||Implemented create, list/enumerate, delete, copy, move and rename directory operations. Methods for reading/or to change DirectorySecurity and Attributes|
- Write MORE Tests
|.NET||net5.0 net5.0-windows net6.0 net6.0-android net6.0-ios net6.0-maccatalyst net6.0-macos net6.0-tvos net6.0-windows net7.0 net7.0-android net7.0-ios net7.0-maccatalyst net7.0-macos net7.0-tvos net7.0-windows|
|.NET Core||netcoreapp2.0 netcoreapp2.1 netcoreapp2.2 netcoreapp3.0 netcoreapp3.1|
|.NET Standard||netstandard2.0 netstandard2.1|
|.NET Framework||net461 net462 net463 net47 net471 net472 net48 net481|
This package is not used by any NuGet packages.
This package is not used by any popular GitHub repositories.