Skip to content

Commit 8478efa

Browse files
authored
Merge pull request #42 from ipfs-shipyard/mfs/add-flush-property
Added missing Flush property to MfsWriteOptions
2 parents 3f0284b + bd78def commit 8478efa

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-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: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
1010

1111
<!-- https://semver.org/spec/v2.0.0.html -->
12-
<Version>0.5.0</Version>
12+
<Version>0.5.1</Version>
1313
<AssemblyVersion>$(Version)</AssemblyVersion>
1414
<LangVersion>12.0</LangVersion>
1515

@@ -41,6 +41,13 @@
4141
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
4242
<AllowedOutputExtensionsInPackageBuildOutputFolder>.pdb;$(AllowedOutputExtensionsInPackageBuildOutputFolder)</AllowedOutputExtensionsInPackageBuildOutputFolder>
4343
<PackageReleaseNotes>
44+
--- 0.5.1 ---
45+
[New]
46+
Added support for MfsWriteOptions.Flush in MfsApi.WriteAsync.
47+
48+
[Improvements]
49+
Updated to IpfsShipyard.Ipfs.Core 0.6.1.
50+
4451
--- 0.5.0 ---
4552
[Breaking]
4653
Inherited breaking changes from IpfsShipyard.Ipfs.Core 0.6.0. See release notes for details.
@@ -77,7 +84,7 @@ Added missing IFileSystemApi.ListAsync. Doesn't fully replace the removed IFileS
7784
</ItemGroup>
7885

7986
<ItemGroup>
80-
<PackageReference Include="IpfsShipyard.Ipfs.Core" Version="0.6.0" />
87+
<PackageReference Include="IpfsShipyard.Ipfs.Core" Version="0.6.1" />
8188
<PackageReference Include="Microsoft.CSharp" Version="4.7.0" />
8289
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
8390
<PackageReference Include="Multiformats.Base" Version="2.0.2" />

0 commit comments

Comments
 (0)