1212
1313## Introduction
1414
15- SharpGrip FileSystem is a .NET file system abstraction supporting multiple adapters.
15+ SharpGrip FileSystem is a versatile .NET file system abstraction that supports multiple storage adapters.
16+ It empowers developers to manage various file systems and services through a unified and easily comprehensible API.
17+ By coding against the abstractions provided by this library, developers can sidestep vendor-specific APIs, effectively avoiding vendor lock-ins.
18+ This flexibility enhances the portability and maintainability of the codebase, allowing for smoother transitions between different file systems.
1619
1720## Installation
1821
@@ -22,17 +25,18 @@ For adapters other than the local file system (included in the `SharpGrip.FileSy
2225
2326## Supported adapters
2427
25- | Adapter | Package | NuGet |
26- | :------------------------------------------------| :--------------------------------------------------| :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
27- | [ Local adapter] ( #local-adapter ) | ` SharpGrip.FileSystem ` | [ ![ NuGet] ( https://img.shields.io/nuget/v/SharpGrip.FileSystem )] ( https://www.nuget.org/packages/SharpGrip.FileSystem ) [ ![ NuGet] ( https://img.shields.io/nuget/dt/SharpGrip.FileSystem )] ( https://www.nuget.org/packages/SharpGrip.FileSystem ) |
28- | [ AmazonS3] ( #amazons3-adapter ) | ` SharpGrip.FileSystem.Adapters.AmazonS3 ` | [ ![ NuGet] ( https://img.shields.io/nuget/v/SharpGrip.FileSystem.Adapters.AmazonS3 )] ( https://www.nuget.org/packages/SharpGrip.FileSystem.Adapters.AmazonS3 ) [ ![ NuGet] ( https://img.shields.io/nuget/dt/SharpGrip.FileSystem.Adapters.AmazonS3 )] ( https://www.nuget.org/packages/SharpGrip.FileSystem.Adapters.AmazonS3 ) |
29- | [ AzureBlobStorage] ( #azureblobstorage-adapter ) | ` SharpGrip.FileSystem.Adapters.AzureBlobStorage ` | [ ![ NuGet] ( https://img.shields.io/nuget/v/SharpGrip.FileSystem.Adapters.AzureBlobStorage )] ( https://www.nuget.org/packages/SharpGrip.FileSystem.Adapters.AzureBlobStorage ) [ ![ NuGet] ( https://img.shields.io/nuget/dt/SharpGrip.FileSystem.Adapters.AzureBlobStorage )] ( https://www.nuget.org/packages/SharpGrip.FileSystem.Adapters.AzureBlobStorage ) |
30- | [ AzureFileStorage] ( #azurefilestorage-adapter ) | ` SharpGrip.FileSystem.Adapters.AzureFileStorage ` | [ ![ NuGet] ( https://img.shields.io/nuget/v/SharpGrip.FileSystem.Adapters.AzureFileStorage )] ( https://www.nuget.org/packages/SharpGrip.FileSystem.Adapters.AzureFileStorage ) [ ![ NuGet] ( https://img.shields.io/nuget/dt/SharpGrip.FileSystem.Adapters.AzureFileStorage )] ( https://www.nuget.org/packages/SharpGrip.FileSystem.Adapters.AzureFileStorage ) |
31- | [ Dropbox] ( #dropbox-adapter ) | ` SharpGrip.FileSystem.Adapters.Dropbox ` | [ ![ NuGet] ( https://img.shields.io/nuget/v/SharpGrip.FileSystem.Adapters.Dropbox )] ( https://www.nuget.org/packages/SharpGrip.FileSystem.Adapters.Dropbox ) [ ![ NuGet] ( https://img.shields.io/nuget/dt/SharpGrip.FileSystem.Adapters.Dropbox )] ( https://www.nuget.org/packages/SharpGrip.FileSystem.Adapters.Dropbox ) |
32- | [ FTP] ( #ftp-adapter ) | ` SharpGrip.FileSystem.Adapters.Ftp ` | [ ![ NuGet] ( https://img.shields.io/nuget/v/SharpGrip.FileSystem.Adapters.Ftp )] ( https://www.nuget.org/packages/SharpGrip.FileSystem.Adapters.Ftp ) [ ![ NuGet] ( https://img.shields.io/nuget/dt/SharpGrip.FileSystem.Adapters.Ftp )] ( https://www.nuget.org/packages/SharpGrip.FileSystem.Adapters.Ftp ) |
33- | [ GoogleDrive] ( #googledrive-adapter ) | ` SharpGrip.FileSystem.Adapters.GoogleDrive ` | [ ![ NuGet] ( https://img.shields.io/nuget/v/SharpGrip.FileSystem.Adapters.GoogleDrive )] ( https://www.nuget.org/packages/SharpGrip.FileSystem.Adapters.GoogleDrive ) [ ![ NuGet] ( https://img.shields.io/nuget/dt/SharpGrip.FileSystem.Adapters.GoogleDrive )] ( https://www.nuget.org/packages/SharpGrip.FileSystem.Adapters.GoogleDrive ) |
34- | [ MicrosoftOneDrive] ( #microsoftonedrive-adapter ) | ` SharpGrip.FileSystem.Adapters.MicrosoftOneDrive ` | [ ![ NuGet] ( https://img.shields.io/nuget/v/SharpGrip.FileSystem.Adapters.MicrosoftOneDrive )] ( https://www.nuget.org/packages/SharpGrip.FileSystem.Adapters.MicrosoftOneDrive ) [ ![ NuGet] ( https://img.shields.io/nuget/dt/SharpGrip.FileSystem.Adapters.MicrosoftOneDrive )] ( https://www.nuget.org/packages/SharpGrip.FileSystem.Adapters.MicrosoftOneDrive ) |
35- | [ SFTP] ( #sftp-adapter ) | ` SharpGrip.FileSystem.Adapters.Sftp ` | [ ![ NuGet] ( https://img.shields.io/nuget/v/SharpGrip.FileSystem.Adapters.Sftp )] ( https://www.nuget.org/packages/SharpGrip.FileSystem.Adapters.Sftp ) [ ![ NuGet] ( https://img.shields.io/nuget/dt/SharpGrip.FileSystem.Adapters.Sftp )] ( https://www.nuget.org/packages/SharpGrip.FileSystem.Adapters.Sftp ) |
28+ | Adapter | Package | NuGet |
29+ | :--------------------------------------------------| :---------------------------------------------------| :-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
30+ | [ Local adapter] ( #local-adapter ) | ` SharpGrip.FileSystem ` | [ ![ NuGet] ( https://img.shields.io/nuget/v/SharpGrip.FileSystem )] ( https://www.nuget.org/packages/SharpGrip.FileSystem ) [ ![ NuGet] ( https://img.shields.io/nuget/dt/SharpGrip.FileSystem )] ( https://www.nuget.org/packages/SharpGrip.FileSystem ) |
31+ | [ AmazonS3] ( #amazons3-adapter ) | ` SharpGrip.FileSystem.Adapters.AmazonS3 ` | [ ![ NuGet] ( https://img.shields.io/nuget/v/SharpGrip.FileSystem.Adapters.AmazonS3 )] ( https://www.nuget.org/packages/SharpGrip.FileSystem.Adapters.AmazonS3 ) [ ![ NuGet] ( https://img.shields.io/nuget/dt/SharpGrip.FileSystem.Adapters.AmazonS3 )] ( https://www.nuget.org/packages/SharpGrip.FileSystem.Adapters.AmazonS3 ) |
32+ | [ AzureBlobStorage] ( #azureblobstorage-adapter ) | ` SharpGrip.FileSystem.Adapters.AzureBlobStorage ` | [ ![ NuGet] ( https://img.shields.io/nuget/v/SharpGrip.FileSystem.Adapters.AzureBlobStorage )] ( https://www.nuget.org/packages/SharpGrip.FileSystem.Adapters.AzureBlobStorage ) [ ![ NuGet] ( https://img.shields.io/nuget/dt/SharpGrip.FileSystem.Adapters.AzureBlobStorage )] ( https://www.nuget.org/packages/SharpGrip.FileSystem.Adapters.AzureBlobStorage ) |
33+ | [ AzureFileStorage] ( #azurefilestorage-adapter ) | ` SharpGrip.FileSystem.Adapters.AzureFileStorage ` | [ ![ NuGet] ( https://img.shields.io/nuget/v/SharpGrip.FileSystem.Adapters.AzureFileStorage )] ( https://www.nuget.org/packages/SharpGrip.FileSystem.Adapters.AzureFileStorage ) [ ![ NuGet] ( https://img.shields.io/nuget/dt/SharpGrip.FileSystem.Adapters.AzureFileStorage )] ( https://www.nuget.org/packages/SharpGrip.FileSystem.Adapters.AzureFileStorage ) |
34+ | [ Dropbox] ( #dropbox-adapter ) | ` SharpGrip.FileSystem.Adapters.Dropbox ` | [ ![ NuGet] ( https://img.shields.io/nuget/v/SharpGrip.FileSystem.Adapters.Dropbox )] ( https://www.nuget.org/packages/SharpGrip.FileSystem.Adapters.Dropbox ) [ ![ NuGet] ( https://img.shields.io/nuget/dt/SharpGrip.FileSystem.Adapters.Dropbox )] ( https://www.nuget.org/packages/SharpGrip.FileSystem.Adapters.Dropbox ) |
35+ | [ FTP] ( #ftp-adapter ) | ` SharpGrip.FileSystem.Adapters.Ftp ` | [ ![ NuGet] ( https://img.shields.io/nuget/v/SharpGrip.FileSystem.Adapters.Ftp )] ( https://www.nuget.org/packages/SharpGrip.FileSystem.Adapters.Ftp ) [ ![ NuGet] ( https://img.shields.io/nuget/dt/SharpGrip.FileSystem.Adapters.Ftp )] ( https://www.nuget.org/packages/SharpGrip.FileSystem.Adapters.Ftp ) |
36+ | [ GoogleCloudStorage] ( #googlecloudstorage-adapter ) | ` SharpGrip.FileSystem.Adapters.GoogleCloudStorage ` | [ ![ NuGet] ( https://img.shields.io/nuget/v/SharpGrip.FileSystem.Adapters.GoogleCloudStorage )] ( https://www.nuget.org/packages/SharpGrip.FileSystem.Adapters.GoogleCloudStorage ) [ ![ NuGet] ( https://img.shields.io/nuget/dt/SharpGrip.FileSystem.Adapters.GoogleCloudStorage )] ( https://www.nuget.org/packages/SharpGrip.FileSystem.Adapters.GoogleCloudStorage ) |
37+ | [ GoogleDrive] ( #googledrive-adapter ) | ` SharpGrip.FileSystem.Adapters.GoogleDrive ` | [ ![ NuGet] ( https://img.shields.io/nuget/v/SharpGrip.FileSystem.Adapters.GoogleDrive )] ( https://www.nuget.org/packages/SharpGrip.FileSystem.Adapters.GoogleDrive ) [ ![ NuGet] ( https://img.shields.io/nuget/dt/SharpGrip.FileSystem.Adapters.GoogleDrive )] ( https://www.nuget.org/packages/SharpGrip.FileSystem.Adapters.GoogleDrive ) |
38+ | [ MicrosoftOneDrive] ( #microsoftonedrive-adapter ) | ` SharpGrip.FileSystem.Adapters.MicrosoftOneDrive ` | [ ![ NuGet] ( https://img.shields.io/nuget/v/SharpGrip.FileSystem.Adapters.MicrosoftOneDrive )] ( https://www.nuget.org/packages/SharpGrip.FileSystem.Adapters.MicrosoftOneDrive ) [ ![ NuGet] ( https://img.shields.io/nuget/dt/SharpGrip.FileSystem.Adapters.MicrosoftOneDrive )] ( https://www.nuget.org/packages/SharpGrip.FileSystem.Adapters.MicrosoftOneDrive ) |
39+ | [ SFTP] ( #sftp-adapter ) | ` SharpGrip.FileSystem.Adapters.Sftp ` | [ ![ NuGet] ( https://img.shields.io/nuget/v/SharpGrip.FileSystem.Adapters.Sftp )] ( https://www.nuget.org/packages/SharpGrip.FileSystem.Adapters.Sftp ) [ ![ NuGet] ( https://img.shields.io/nuget/dt/SharpGrip.FileSystem.Adapters.Sftp )] ( https://www.nuget.org/packages/SharpGrip.FileSystem.Adapters.Sftp ) |
3640
3741## Supported operations
3842
@@ -144,6 +148,22 @@ var adapters = new List<IAdapter>
144148var fileSystem = new FileSystem(adapters);
145149```
146150
151+ ### GoogleCloudStorage adapter
152+
153+ ```
154+ // Google connection.
155+ var credential = GoogleCredential.FromFile("path/to/credential/file");
156+ var storageClient = await StorageClient.CreateAsync(credential);
157+
158+ var adapters = new List<IAdapter>
159+ {
160+ new LocalAdapter("local", "/var/files"),
161+ new GoogleCloudStorageAdapter(prefix, rootPath, storageClient, "bucketName", configuration);
162+ };
163+
164+ var fileSystem = new FileSystem(adapters);
165+ ```
166+
147167### GoogleDrive adapter
148168
149169```
0 commit comments