dresswithpockets / FakeS3

in-memory and on-disk S3 provider for .NET

Home Page:https://dresswithpockets.github.io/FakeS3

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

FakeS3.Net

.NET Port of fake-s3.

Nuget

Install

If you just want the IAmazonS3 providers:

dotnet add package FakeS3.AWS

Or, if you dont want IAmazonS3 but still want FakeS3:

dotnet add package FakeS3

Example Usage

On-Disk storage:

using System;
using FakeS3.AWS;

// create a temporary folder to use as the on-disk s3 root
var tempRoot = Path.Join(Path.GetTempPath(), Path.GetRandomFileName());
Directory.CreateDirectory(tempRoot); 

// create IAmazonS3 instance that saves buckets to local folder
var client = FakeS3.CreateFileClient(tempRoot, false);

// use `client` directly or pass it to something like
// `Amazon.S3.Transfer.TransferUtility`

In-Memory storage (Note: in-memory provider is still WIP):

// create IAmazonS3 instance that stores buckets in memory
var client = FakeS3.CreateMemoryClient();

// use `client` directly or pass it to something like
// `Amazon.S3.Transfer.TransferUtility`

About

in-memory and on-disk S3 provider for .NET

https://dresswithpockets.github.io/FakeS3

License:Apache License 2.0


Languages

Language:C# 89.0%Language:CSS 9.7%Language:JavaScript 1.2%