-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Release 0.19.0. See release notes or expand full commit message.
[New] Added IAddFileToGetCid interface. This is functionally identical to IGetCid, but instead of simply returning a CID already in ipfs, it computes the CID by providing data to ipfs using preferences in the AddFileOptions parameter. [Breaking] StorableKuboExtensions.GetCidAsync now takes an AddFileOptions parameter. ContentAddressedSystemFile and ContentAddressedSystemFolder now implement IAddFileToGetCid instead of IGetCid. [Fixes] Inherited fixes from OwlCore.ComponentModel 0.9.1. Fixed issues with MfsStream where it would return before the task was complete. MfsStream.ReadAsync and MfsStream.WriteAsync now respect the requested offset when operating on the provided buffer. [Improvement] Updated to IpfsShipyard.Ipfs.Http.Client 0.5.1. MfsStream.WriteAsync now supplies Flush = false when writing to mfs, instead of the default of flushing after every write. This improves performance when writing large files, but requires a manual call to FlushAsync to persist the changes.
- Loading branch information
1 parent
734035c
commit 4240bcc
Showing
9 changed files
with
120 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
using Ipfs; | ||
using Ipfs.CoreApi; | ||
using OwlCore.Storage; | ||
|
||
namespace OwlCore.Kubo; | ||
|
||
/// <summary> | ||
/// Implementations are capable of providing a CID for the current content by adding it ipfs. | ||
/// </summary> | ||
public partial interface IAddFileToGetCid : IStorable | ||
{ | ||
/// <summary> | ||
/// Gets the CID of the storable item. | ||
/// </summary> | ||
/// <param name="addFileOptions">The add file options to use when computing the cid for this storable.</param> | ||
/// <param name="cancellationToken">A token that can be used to cancel the ongoing operation.</param> | ||
/// <returns></returns> | ||
public Task<Cid> GetCidAsync(AddFileOptions addFileOptions, CancellationToken cancellationToken); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters