You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 10, 2020. It is now read-only.
Copy file name to clipboardExpand all lines: SPEC/FILES.md
+8-1Lines changed: 8 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -160,6 +160,7 @@ If no `content` is passed, then the path is treated as an empty directory
160
160
- wrapWithDirectory (boolean): adds a wrapping node around the content.
161
161
- onlyHash (boolean): doesn't actually add the file to IPFS, but rather calculates its hash.
162
162
- pin (boolean, default true): pin this object when adding.
163
+
- raw-leaves (boolean, default false): if true, DAG leaves will contain raw file data and not be wrapped in a protobuf
163
164
164
165
`callback` must follow `function (err, res) {}` signature, where `err` is an error if the operation was not successful. `res` will be an array of:
165
166
@@ -696,6 +697,7 @@ Where:
696
697
-`hash` is a Boolean value to return only the hash (default: false)
697
698
-`size` is a Boolean value to return only the size (default: false)
698
699
-`withLocal` is a Boolean value to compute the amount of the dag that is local, and if possible the total size (default: false)
700
+
-`cidBase` is which number base to use to format hashes - e.g. `base32`, `base64` etc (default: `base58btc`)
699
701
-`callback` is an optional function with the signature `function (error, stats) {}`, where `error` may be an Error that occured if the operation was not successful and `stats` is an Object with the following keys:
700
702
701
703
-`hash` is a string with the hash
@@ -874,6 +876,8 @@ Where:
874
876
-`create` is a Boolean to indicate to create the file if it doesn't exist (default: false)
875
877
-`truncate` is a Boolean to indicate if the file should be truncated after writing all the bytes from `content` (default: false)
876
878
-`length` is an Integer with the maximum number of bytes to read (default: Read all bytes from `content`)
879
+
-`raw-leaves`: if true, DAG leaves will contain raw file data and not be wrapped in a protobuf (boolean, default false)
880
+
-`cid-version`: the CID version to use when storing the data (storage keys are based on the CID, including it's version) (integer, default 0)
877
881
-`callback` is an optional function with the signature `function (error) {}`, where `error` may be an Error that occured if the operation was not successful
878
882
879
883
If no `callback` is passed, a promise is returned.
-`path` is an optional string to show listing for (default: `/`)
982
+
-`options` is an optional Object that might contain the following keys:
983
+
-`long` is a Boolean value to decide whether or not to populate `type`, `size` and `hash` (default: false)
984
+
-`cidBase` is which number base to use to format hashes - e.g. `base32`, `base64` etc (default: `base58btc`)
978
985
-`callback` is an optional function with the signature `function (error, files) {}`, where `error` may be an Error that occured if the operation was not successful and `files` is an array containing Objects that contain the following keys:
0 commit comments