Skip to content
This repository was archived by the owner on Mar 10, 2020. It is now read-only.

Commit 04c1625

Browse files
committed
Add docs for the pin option for files.add*
1 parent 0a62f02 commit 04c1625

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

SPEC/FILES.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ If no `content` is passed, then the path is treated as an empty directory
5656
- hashAlg || hash (string): multihash hashing algorithm to use.
5757
- wrapWithDirectory (boolean): adds a wrapping node around the content.
5858
- onlyHash (boolean): doesn't actually add the file to IPFS, but rather calculates its hash.
59+
- pin (boolean, default true): pin this object when adding.
5960

6061
`callback` must follow `function (err, res) {}` signature, where `err` is an error if the operation was not successful. `res` will be an array of:
6162

@@ -109,6 +110,7 @@ Returns a Readable Stream of class Duplex, where objects can be written of the f
109110
- progress (function): a function that will be called with the byte length of chunks as a file is added to ipfs.
110111
- hashAlg || hash (string): multihash hashing algorithm to use
111112
- wrapWithDirectory (boolean): adds a wrapping node around the content
113+
- pin (boolean, default true): pin this object when adding.
112114

113115
**Example:**
114116

@@ -158,6 +160,7 @@ Returns a Pull Stream, where objects can be written of the forms
158160
- progress (function): a function that will be called with the byte length of chunks as a file is added to ipfs.
159161
- hashAlg || hash (string): multihash hashing algorithm to use
160162
- wrapWithDirectory (boolean): adds a wrapping node around the content
163+
- pin (boolean, default true): pin this object when adding.
161164

162165
**Example:**
163166

0 commit comments

Comments
 (0)