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

Commit 513bcc7

Browse files
committed
docs: add cid-base and missing ls options for mfs operations
Documents the new options added by ipfs/js-ipfs#1454 as well as the missing `long` option from `files.ls`
1 parent 7ed2b58 commit 513bcc7

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

SPEC/FILES.md

+5-1
Original file line numberDiff line numberDiff line change
@@ -696,6 +696,7 @@ Where:
696696
- `hash` is a Boolean value to return only the hash (default: false)
697697
- `size` is a Boolean value to return only the size (default: false)
698698
- `withLocal` is a Boolean value to compute the amount of the dag that is local, and if possible the total size (default: false)
699+
- `cidBase` is which number base to use to format hashes - e.g. `base32`, `base64` etc (default: `base58btc`)
699700
- `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:
700701

701702
- `hash` is a string with the hash
@@ -970,11 +971,14 @@ ipfs.files.flush('/', (err) => {
970971
971972
##### `Go` **WIP**
972973

973-
##### `JavaScript` - ipfs.files.ls([path], [callback])
974+
##### `JavaScript` - ipfs.files.ls([path], [options], [callback])
974975

975976
Where:
976977

977978
- `path` is an optional string to show listing for (default: `/`)
979+
- `options` is an optional Object that might contain the following keys:
980+
- `long` is a Boolean value to decide whether or not to populate `type`, `size` and `hash` (default: false)
981+
- `cidBase` is which number base to use to format hashes - e.g. `base32`, `base64` etc (default: `base58btc`)
978982
- `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:
979983

980984
- `name` which is the file's name

0 commit comments

Comments
 (0)