A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://richardschneider.github.io/net-ipfs-core/api/Ipfs.CoreApi.IBlockApi.html below:

Interface IBlockApi

Manages IPFS blocks.

Namespace: Ipfs.CoreApi Assembly: Ipfs.Core.dll Syntax
public interface IBlockApi
Methods | Improve this Doc View Source GetAsync(Cid, CancellationToken)

Gets an IPFS block.

Declaration
Task<IDataBlock> GetAsync(Cid id, CancellationToken cancel = default(CancellationToken))
Parameters Returns Type Description Task<IDataBlock>

A task that represents the asynchronous get operation. The task's value contains the block's id and data.

| Improve this Doc View Source PutAsync(Byte[], String, String, String, Boolean, CancellationToken)

Stores a byte array as an IPFS block.

Declaration
Task<Cid> PutAsync(byte[] data, string contentType = "dag-pb", string multiHash = "sha2-256", string encoding = "base58btc", bool pin = false, CancellationToken cancel = default(CancellationToken))
Parameters Type Name Description Byte[] data

The byte array to send to the IPFS network.

String contentType

The content type or format of the data; such as "raw" or "dag-db". See MultiCodec for more details.

String multiHash

The MultiHash algorithm name used to produce the Cid.

String encoding

The MultiBase algorithm name used to produce the Cid.

Boolean pin

If true the block is pinned to local storage and will not be garbage collected. The default is false.

CancellationToken cancel

Is used to stop the task. When cancelled, the TaskCanceledException is raised.

Returns Type Description Task<Cid>

A task that represents the asynchronous put operation. The task's value is the block's Cid.

| Improve this Doc View Source PutAsync(Stream, String, String, String, Boolean, CancellationToken)

Stores a stream as an IPFS block.

Declaration
Task<Cid> PutAsync(Stream data, string contentType = "dag-pb", string multiHash = "sha2-256", string encoding = "base58btc", bool pin = false, CancellationToken cancel = default(CancellationToken))
Parameters Type Name Description Stream data

The Stream of data to send to the IPFS network.

String contentType

The content type or format of the data; such as "raw" or "dag-db". See MultiCodec for more details.

String multiHash

The MultiHash algorithm name used to produce the Cid.

String encoding

The MultiBase algorithm name used to produce the Cid.

Boolean pin

If true the block is pinned to local storage and will not be garbage collected. The default is false.

CancellationToken cancel

Is used to stop the task. When cancelled, the TaskCanceledException is raised.

Returns Type Description Task<Cid>

A task that represents the asynchronous put operation. The task's value is the block's Cid.

| Improve this Doc View Source RemoveAsync(Cid, Boolean, CancellationToken)

Remove an IPFS block.

Declaration
Task<Cid> RemoveAsync(Cid id, bool ignoreNonexistent = false, CancellationToken cancel = default(CancellationToken))
Parameters Type Name Description Cid id

The Cid of the block.

Boolean ignoreNonexistent

If true do not raise exception when id does not exist. Default value is false.

CancellationToken cancel

Is used to stop the task. When cancelled, the TaskCanceledException is raised.

Returns Type Description Task<Cid>

The awaited Task will return the deleted id or null if the id does not exist and ignoreNonexistent is true.

| Improve this Doc View Source StatAsync(Cid, CancellationToken)

Information on an IPFS block.

Declaration
Task<IDataBlock> StatAsync(Cid id, CancellationToken cancel = default(CancellationToken))
Parameters Returns Type Description Task<IDataBlock>

A task that represents the asynchronous operation. The task's value contains the block's id and size or null.

See Also

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4