Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface WriteOptions

Hierarchy

Index

Properties

cidVersion?: CIDVersion

The CID version to use for any updated entries

create?: boolean

Create the MFS path if it does not exist

flush?: boolean

If true the changes will be immediately flushed to disk

hashAlg?: string

The hash algorithm to use for any updated entries

length?: number

Optionally limit how many bytes are written

mode?: number

An integer that represents the file mode

mtime?: MtimeLike

A Date object, an object with { secs, nsecs } properties where secs is the number of seconds since (positive) or before (negative) the Unix Epoch began and nsecs is the number of nanoseconds since the last full second, or the output of process.hrtime()

offset?: number

An offset within the file to start writing at

parents?: boolean

Create intermediate MFS paths if they do not exist

progress?: AddProgressFn

Callback to be notified of write progress

rawLeaves?: boolean

If true, DAG leaves will contain raw file data and not be wrapped in a protobuf

reduceSingleLeafToSelf?: boolean

If writing a file and only a single leaf would be present, store the file data in the root node

shardSplitThreshold?: number

The threshold for splitting any modified folders into HAMT shards

signal?: AbortSignal

Can be provided to a function that starts a long running task, which will be aborted when signal is triggered.

strategy?: "balanced" | "trickle"

What sort of DAG structure to create

timeout?: number

Can be provided to a function that starts a long running task, which will be aborted after provided timeout (in ms).

truncate?: boolean

Truncate the file at the MFS path if it would have been larger than the passed content

Generated using TypeDoc