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

Commit

Permalink
Merge pull request #297 from Powersource/master
Browse files Browse the repository at this point in the history
Add docs for the pin option for files.add*
  • Loading branch information
alanshaw authored Jun 14, 2018
2 parents 510516a + 04c1625 commit 1f0b72f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions SPEC/FILES.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ If no `content` is passed, then the path is treated as an empty directory
- hashAlg || hash (string): multihash hashing algorithm to use.
- wrapWithDirectory (boolean): adds a wrapping node around the content.
- onlyHash (boolean): doesn't actually add the file to IPFS, but rather calculates its hash.
- pin (boolean, default true): pin this object when adding.

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

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

**Example:**

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

**Example:**

Expand Down

0 comments on commit 1f0b72f

Please sign in to comment.