Skip to content

Commit

Permalink
Merge pull request #38 from ipfs-shipyard/mfs/add-flush-property
Browse files Browse the repository at this point in the history
Add a bool Flush property to MfsWriteOptions
  • Loading branch information
Arlodotexe authored Sep 14, 2024
2 parents f829aff + 3571c49 commit 57dffd3
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
11 changes: 11 additions & 0 deletions src/CoreApi/MfsWriteOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -77,5 +77,16 @@ public class MfsWriteOptions
/// </value>
/// <seealso cref="MultiHash.DefaultAlgorithmName"/>
public string? Hash { get; set; } = null;

/// <summary>
/// Flush the data to disk after writing.
/// </summary>
/// <value>
/// The default is <b>null</b> and the server will use its default of true.
/// </value>
/// <remarks>
/// Use caution when setting this flag to false. It will improve performance for large numbers of file operations, but it does so at the cost of consistency guarantees. If the daemon is unexpectedly killed before running a proper flush, then data may be lost. This also applies to running the gc concurrently with flush false.
/// </remarks>
public bool? Flush { get; set; } = null;
}
}
6 changes: 5 additions & 1 deletion src/IpfsCore.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<LangVersion>12.0</LangVersion>

<!-- https://semver.org/spec/v2.0.0.html -->
<Version>0.6.0</Version>
<Version>0.6.1</Version>
<AssemblyVersion>$(Version)</AssemblyVersion>

<!-- Nuget specs -->
Expand All @@ -30,6 +30,10 @@
<GeneratePackageOnBuild Condition=" '$(Configuration)' == 'Release' ">true</GeneratePackageOnBuild>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<PackageReleaseNotes>
--- 0.6.1 ---
[New]
Added missing MfsWriteOptions.Flush property.

--- 0.6.0 ---
[Breaking]
Added missing IMfsApi.ReadFileStreamAsync method.
Expand Down

0 comments on commit 57dffd3

Please sign in to comment.