Skip to content

Release/1.2 #41

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 11 commits into from
May 23, 2024
Merged
6 changes: 3 additions & 3 deletions .github/workflows/Build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,18 +28,18 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up Java
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
java-version: ${{ env.JAVA_VERSION }}
distribution: ${{ env.JAVA_DISTRIBUTION }}

- name: Set up .NET
uses: actions/setup-dotnet@v3
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ env.DOTNET_VERSION }}

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/Release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up .NET
uses: actions/setup-dotnet@v3
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ env.DOTNET_VERSION }}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@
</PropertyGroup>

<ItemGroup>
<None Include="..\README.md" Pack="true" PackagePath="\" />
<None Include="README.md" Pack="true" PackagePath="\" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="AWSSDK.S3" Version="3.7.305.3" />
<PackageReference Include="AWSSDK.S3" Version="3.7.308.3" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
Expand Down
20 changes: 20 additions & 0 deletions FileSystem.Adapters.AmazonS3/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# SharpGrip FileSystem AmazonS3 adapter [![NuGet](https://img.shields.io/nuget/v/SharpGrip.FileSystem.Adapters.AmazonS3)](https://www.nuget.org/packages/SharpGrip.FileSystem.Adapters.AmazonS3)

## Installation

Reference NuGet package `SharpGrip.FileSystem.Adapters.AmazonS3` (https://www.nuget.org/packages/SharpGrip.FileSystem.Adapters.AmazonS3).

## Usage

```
// Amazon connection.
var amazonClient = new AmazonS3Client("awsAccessKeyId", "awsSecretAccessKey", RegionEndpoint.USEast2);

var adapters = new List<IAdapter>
{
new AmazonS3Adapter("amazon1", "/Files", amazonClient, "bucketName1")
new AmazonS3Adapter("amazon2", "/Files", amazonClient, "bucketName2")
};

var fileSystem = new FileSystem(adapters);
```
3 changes: 2 additions & 1 deletion FileSystem.Adapters.AmazonS3/src/AmazonS3Adapter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,10 @@ public override void Dispose()
client.Dispose();
}

public override void Connect()
public override async Task ConnectAsync(CancellationToken cancellationToken = default)
{
Logger.LogStartConnectingAdapter(this);
await Task.CompletedTask;
Logger.LogFinishedConnectingAdapter(this);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@
</PropertyGroup>

<ItemGroup>
<None Include="..\README.md" Pack="true" PackagePath="\" />
<None Include="README.md" Pack="true" PackagePath="\" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Azure.Storage.Blobs" Version="12.19.1" />
<PackageReference Include="Azure.Storage.Blobs" Version="12.20.0" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
Expand Down
21 changes: 21 additions & 0 deletions FileSystem.Adapters.AzureBlobStorage/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# SharpGrip FileSystem AzureBlobStorage adapter [![NuGet](https://img.shields.io/nuget/v/SharpGrip.FileSystem.Adapters.AzureBlobStorage)](https://www.nuget.org/packages/SharpGrip.FileSystem.Adapters.AzureBlobStorage)

## Installation

Reference NuGet package `SharpGrip.FileSystem.Adapters.AzureBlobStorage` (https://www.nuget.org/packages/SharpGrip.FileSystem.Adapters.AzureBlobStorage).

## Usage

```
// Azure connection.
var blobServiceClient = new BlobServiceClient("connectionString");
var azureClient = blobServiceClient.GetBlobContainerClient("blobContainerName");

var adapters = new List<IAdapter>
{
new LocalAdapter("local", "/var/files"),
new AzureBlobStorageAdapter("azure", "/Files", azureClient)
};

var fileSystem = new FileSystem(adapters);
```
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,10 @@ public override void Dispose()
{
}

public override void Connect()
public override async Task ConnectAsync(CancellationToken cancellationToken = default)
{
Logger.LogStartConnectingAdapter(this);
await Task.CompletedTask;
Logger.LogFinishedConnectingAdapter(this);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@
</PropertyGroup>

<ItemGroup>
<None Include="..\README.md" Pack="true" PackagePath="\" />
<None Include="README.md" Pack="true" PackagePath="\" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Azure.Storage.Files.Shares" Version="12.17.1" />
<PackageReference Include="Azure.Storage.Files.Shares" Version="12.18.0" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
Expand Down
20 changes: 20 additions & 0 deletions FileSystem.Adapters.AzureFileStorage/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# SharpGrip FileSystem AzureFileStorage adapter [![NuGet](https://img.shields.io/nuget/v/SharpGrip.FileSystem.Adapters.AzureFileStorage)](https://www.nuget.org/packages/SharpGrip.FileSystem.Adapters.AzureFileStorage)

## Installation

Reference NuGet package `SharpGrip.FileSystem.Adapters.AzureFileStorage` (https://www.nuget.org/packages/SharpGrip.FileSystem.Adapters.AzureFileStorage).

## Usage

```
// Azure connection.
var azureClient = new ShareClient("connectionString", "shareName");

var adapters = new List<IAdapter>
{
new LocalAdapter("local", "/var/files"),
new AzureFileStorageAdapter("azure", "/Files", azureClient)
};

var fileSystem = new FileSystem(adapters);
```
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,10 @@ public override void Dispose()
{
}

public override void Connect()
public override async Task ConnectAsync(CancellationToken cancellationToken = default)
{
Logger.LogStartConnectingAdapter(this);
await Task.CompletedTask;
Logger.LogFinishedConnectingAdapter(this);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@
</PropertyGroup>

<ItemGroup>
<None Include="..\README.md" Pack="true" PackagePath="\" />
<None Include="README.md" Pack="true" PackagePath="\" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Dropbox.Api" Version="6.37.0" />
<PackageReference Include="Dropbox.Api" Version="7.0.0" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
Expand Down
20 changes: 20 additions & 0 deletions FileSystem.Adapters.Dropbox/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# SharpGrip FileSystem Dropbox adapter [![NuGet](https://img.shields.io/nuget/v/SharpGrip.FileSystem.Adapters.Dropbox)](https://www.nuget.org/packages/SharpGrip.FileSystem.Adapters.Dropbox)

## Installation

Reference NuGet package `SharpGrip.FileSystem.Adapters.Dropbox` (https://www.nuget.org/packages/SharpGrip.FileSystem.Adapters.Dropbox).

## Usage

```
// Dropbox connection.
var dropboxClient = new DropboxClient("oAuth2AccessToken");

var adapters = new List<IAdapter>
{
new LocalAdapter("local", "/var/files"),
new DropboxAdapter("dropbox", "/Files", dropboxClient)
};

var fileSystem = new FileSystem(adapters);
```
3 changes: 2 additions & 1 deletion FileSystem.Adapters.Dropbox/src/DropboxAdapter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,10 @@ public override void Dispose()
client.Dispose();
}

public override void Connect()
public override async Task ConnectAsync(CancellationToken cancellationToken = default)
{
Logger.LogStartConnectingAdapter(this);
await Task.CompletedTask;
Logger.LogFinishedConnectingAdapter(this);
}

Expand Down
31 changes: 31 additions & 0 deletions FileSystem.Adapters.Ftp/FileSystem.Adapters.Ftp.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<RootNamespace>SharpGrip.FileSystem.Adapters.Ftp</RootNamespace>
</PropertyGroup>

<PropertyGroup>
<AssemblyName>SharpGrip.FileSystem.Adapters.Ftp</AssemblyName>
<PackageId>SharpGrip.FileSystem.Adapters.Ftp</PackageId>
<Title>SharpGrip FileSystem FTP adapter</Title>
<Description>The SharpGrip FileSystem FTP adapter.</Description>
<PackageTags>sharpgrip;file-system;ftp</PackageTags>
</PropertyGroup>

<ItemGroup>
<None Include="README.md" Pack="true" PackagePath="\" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="FluentFTP" Version="50.0.1" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\FileSystem\FileSystem.csproj" />
</ItemGroup>

</Project>
20 changes: 20 additions & 0 deletions FileSystem.Adapters.Ftp/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# SharpGrip FileSystem Ftp adapter [![NuGet](https://img.shields.io/nuget/v/SharpGrip.FileSystem.Adapters.Ftp)](https://www.nuget.org/packages/SharpGrip.FileSystem.Adapters.Ftp)

## Installation

Reference NuGet package `SharpGrip.FileSystem.Adapters.Ftp` (https://www.nuget.org/packages/SharpGrip.FileSystem.Adapters.Ftp).

## Usage

```
// FTP connection.
var ftpClient = new AsyncFtpClient("hostname", "username", "password");

var adapters = new List<IAdapter>
{
new LocalAdapter("local", "/var/files"),
new FtpAdapter("ftp", "/var/files", ftpClient)
};

var fileSystem = new FileSystem(adapters);
```
Loading
Loading