Skip to content

Commit 2a0468b

Browse files
committed
Added support for MfsWriteOptions.Flush in MfsApi.WriteAsync.
1 parent 3f0284b commit 2a0468b

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/CoreApi/MfsApi.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,8 @@ public async Task WriteAsync(string path, Stream data, MfsWriteOptions options,
211211
opts.Add($"raw-leaves={options.RawLeaves.ToString().ToLower()}");
212212
if (options.Hash != null && options.Hash != MultiHash.DefaultAlgorithmName)
213213
opts.Add($"hash=${options.Hash}");
214+
if (options.Flush.HasValue)
215+
opts.Add($"flush={options.Flush.ToString().ToLower()}");
214216

215217
if (string.IsNullOrEmpty(path) || !path.StartsWith("/"))
216218
throw new ArgumentException("Argument path is required and must start with '/'.");

src/IpfsHttpClient.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<Project Sdk="Microsoft.NET.Sdk">
1+
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
44
<TargetFrameworks>netstandard2.0</TargetFrameworks>
@@ -77,7 +77,7 @@ Added missing IFileSystemApi.ListAsync. Doesn't fully replace the removed IFileS
7777
</ItemGroup>
7878

7979
<ItemGroup>
80-
<PackageReference Include="IpfsShipyard.Ipfs.Core" Version="0.6.0" />
80+
<PackageReference Include="IpfsShipyard.Ipfs.Core" Version="0.6.1" />
8181
<PackageReference Include="Microsoft.CSharp" Version="4.7.0" />
8282
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
8383
<PackageReference Include="Multiformats.Base" Version="2.0.2" />

0 commit comments

Comments
 (0)