Skip to content

Latest commit

 

History

History
67 lines (50 loc) · 3.18 KB

File metadata and controls

67 lines (50 loc) · 3.18 KB

Ramstack.FileSystem.Google

NuGet MIT

Provides an implementation of Ramstack.FileSystem using Google Cloud Storage.

Getting Started

To install the Ramstack.FileSystem.Google NuGet package in your project, run the following command:

dotnet add package Ramstack.FileSystem.Google

Usage

using Ramstack.FileSystem.Google;

var client = StorageClient.Create(
    GoogleCredential.FromFile("/path/to/credentials.json"));

GoogleFileSystem fs = new GoogleFileSystem(client, bucketName: "my-bucket");

// Create GCS bucket if it doesn't exist
await fs.CreateBucketAsync("my-project-id");

await foreach (VirtualFile file in fs.GetFilesAsync("/"))
{
    Console.WriteLine(node.Name);
}

You can also configure the file system to be read-only:

GoogleFileSystem fs = new GoogleFileSystem(client, bucketName: "my-bucket")
{
    IsReadOnly = true
};

Related Projects

Supported Versions

Version
.NET 6, 7, 8, 9, 10

Contributions

Bug reports and contributions are welcome.

License

This package is released as open source under the MIT License. See the LICENSE file for more details.