AzureBlobAdapterAssembly 1.1.1

This is an adapter for the Azure Blob Storage REST SDK to integrate with the existing .NET System.IO based file system access code with little or no changes.

Install-Package AzureBlobAdapterAssembly -Version 1.1.1
dotnet add package AzureBlobAdapterAssembly --version 1.1.1
<PackageReference Include="AzureBlobAdapterAssembly" Version="1.1.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add AzureBlobAdapterAssembly --version 1.1.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

AzureBlobAdapter

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.

Design Guidelines

  1. 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.

  2. This library uses the latest version of Azure Blob SDK - version 12.x

  3. 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.

  4. 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
  5. 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

  1. 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.
  2. 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.
  3. 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
  4. Many functionalities of the file systems are not available with the Blob. Example: FileSystemSecurity (audits, access rules, etc).
  5. 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

  1. Most of the time in the .NET applications, we create/update/deleting/listing files and directories. (CRUD)
  2. File and Directory Information - Work in progress

Implemented Interfaces and Methods

| Interface | Remarks |
| ------ | ------ |
|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|
|IDriveInfoFactory|100%|
|IDriveInfo|Name, IsReady|
|IDirectory|Implemented create, list/enumerate, delete, copy, move and rename directory operations. Methods for reading/or to change DirectorySecurity and Attributes|

Todos

  • Write MORE Tests

License

MIT

AzureBlobAdapter

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.

Design Guidelines

  1. 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.

  2. This library uses the latest version of Azure Blob SDK - version 12.x

  3. 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.

  4. 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
  5. 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

  1. 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.
  2. 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.
  3. 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
  4. Many functionalities of the file systems are not available with the Blob. Example: FileSystemSecurity (audits, access rules, etc).
  5. 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

  1. Most of the time in the .NET applications, we create/update/deleting/listing files and directories. (CRUD)
  2. File and Directory Information - Work in progress

Implemented Interfaces and Methods

| Interface | Remarks |
| ------ | ------ |
|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|
|IDriveInfoFactory|100%|
|IDriveInfo|Name, IsReady|
|IDirectory|Implemented create, list/enumerate, delete, copy, move and rename directory operations. Methods for reading/or to change DirectorySecurity and Attributes|

Todos

  • Write MORE Tests

License

MIT

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version History

Version Downloads Last updated
1.1.1 71 8/28/2020
1.0.1 87 8/20/2020
1.0.0 156 8/14/2020