Class AddFileOptions
The options when adding data to the IPFS file system.
Inherited Members
Namespace: Ipfs.CoreApi
Assembly: Ipfs.Core.dll
Syntax
public class AddFileOptions
Properties
| Improve this Doc View SourceChunkSize
The maximum number of data bytes in a block.
Declaration
public int ChunkSize { get; set; }
Property Value
Type | Description |
---|---|
Int32 | The default is 256 * 1024 (262,144) bytes. |
Encoding
The encoding algorithm name to use.
Declaration
public string Encoding { get; set; }
Property Value
Type | Description |
---|---|
String | The MultiBase algorithm name used to produce the Cid. Defaults to DefaultAlgorithmName. |
See Also
| Improve this Doc View SourceHash
The hashing algorithm name to use.
Declaration
public string Hash { get; set; }
Property Value
Type | Description |
---|---|
String | The MultiHash algorithm name used to produce the Cid. Defaults to DefaultAlgorithmName. |
See Also
| Improve this Doc View SourceOnlyHash
Determines if only file information is produced.
Declaration
public bool OnlyHash { get; set; }
Property Value
Type | Description |
---|---|
Boolean | If true no data is added to IPFS. The default is false. |
Pin
Determines if the data is pinned to local storage.
Declaration
public bool Pin { get; set; }
Property Value
Type | Description |
---|---|
Boolean | If true the data is pinned to local storage and will not be garbage collected. The default is true. |
Progress
Used to report the progress of a file transfer.
Declaration
public IProgress<TransferProgress> Progress { get; set; }
Property Value
Type | Description |
---|---|
IProgress<TransferProgress> |
ProtectionKey
The key name used to protect (encrypt) the file contents.
Declaration
public string ProtectionKey { get; set; }
Property Value
Type | Description |
---|---|
String | The name of an existing key. |
Remarks
ProtectionKey and RawLeaves are mutually exclusive.
See Also
| Improve this Doc View SourceRawLeaves
Determines if raw blocks are used for leaf data blocks.
Declaration
public bool RawLeaves { get; set; }
Property Value
Type | Description |
---|---|
Boolean | The default is false. |
Remarks
RawLeaves and ProtectionKey are mutually exclusive.
Trickle
Determines if the trickle-dag format is used for dag generation.
Declaration
public bool Trickle { get; set; }
Property Value
Type | Description |
---|---|
Boolean | The default is false. |
Wrap
Determines if added file(s) are wrapped in a directory object.
Declaration
public bool Wrap { get; set; }
Property Value
Type | Description |
---|---|
Boolean | The default is false. |