Skip to content

Commit

Permalink
Merge pull request #42 from ipfs-shipyard/mfs/add-flush-property
Browse files Browse the repository at this point in the history
Added missing Flush property to MfsWriteOptions
  • Loading branch information
Arlodotexe authored Sep 14, 2024
2 parents 3f0284b + bd78def commit 8478efa
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
2 changes: 2 additions & 0 deletions src/CoreApi/MfsApi.cs
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,8 @@ public async Task WriteAsync(string path, Stream data, MfsWriteOptions options,
opts.Add($"raw-leaves={options.RawLeaves.ToString().ToLower()}");
if (options.Hash != null && options.Hash != MultiHash.DefaultAlgorithmName)
opts.Add($"hash=${options.Hash}");
if (options.Flush.HasValue)
opts.Add($"flush={options.Flush.ToString().ToLower()}");

if (string.IsNullOrEmpty(path) || !path.StartsWith("/"))
throw new ArgumentException("Argument path is required and must start with '/'.");
Expand Down
11 changes: 9 additions & 2 deletions src/IpfsHttpClient.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>

<!-- https://semver.org/spec/v2.0.0.html -->
<Version>0.5.0</Version>
<Version>0.5.1</Version>
<AssemblyVersion>$(Version)</AssemblyVersion>
<LangVersion>12.0</LangVersion>

Expand Down Expand Up @@ -41,6 +41,13 @@
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
<AllowedOutputExtensionsInPackageBuildOutputFolder>.pdb;$(AllowedOutputExtensionsInPackageBuildOutputFolder)</AllowedOutputExtensionsInPackageBuildOutputFolder>
<PackageReleaseNotes>
--- 0.5.1 ---
[New]
Added support for MfsWriteOptions.Flush in MfsApi.WriteAsync.

[Improvements]
Updated to IpfsShipyard.Ipfs.Core 0.6.1.

--- 0.5.0 ---
[Breaking]
Inherited breaking changes from IpfsShipyard.Ipfs.Core 0.6.0. See release notes for details.
Expand Down Expand Up @@ -77,7 +84,7 @@ Added missing IFileSystemApi.ListAsync. Doesn't fully replace the removed IFileS
</ItemGroup>

<ItemGroup>
<PackageReference Include="IpfsShipyard.Ipfs.Core" Version="0.6.0" />
<PackageReference Include="IpfsShipyard.Ipfs.Core" Version="0.6.1" />
<PackageReference Include="Microsoft.CSharp" Version="4.7.0" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="Multiformats.Base" Version="2.0.2" />
Expand Down

0 comments on commit 8478efa

Please sign in to comment.