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

Commit 0b37b57

Browse files
vmxAlan Shaw
authored andcommitted
docs: format callback return values correctly (#369)
Some return values of the callbacks weren't correctly indented, which made things unpleasant to read.
1 parent 45e8142 commit 0b37b57

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

SPEC/FILES.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -705,14 +705,14 @@ Where:
705705
- `cidBase` is which number base to use to format hashes - e.g. `base32`, `base64` etc (default: `base58btc`)
706706
- `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:
707707

708-
- `hash` is a string with the hash
709-
- `size` is an integer with the file size in Bytes
710-
- `cumulativeSize` is an integer with the size of the DAGNodes making up the file in Bytes
711-
- `type` is a string that can be either `directory` or `file`
712-
- `blocks` if `type` is `directory`, this is the number of files in the directory. If it is `file` it is the number of blocks that make up the file
713-
- `withLocality` is a boolean to indicate if locality information are present
714-
- `local` is a boolean to indicate if the queried dag is fully present locally
715-
- `sizeLocal` is an integer indicating the cumulative size of the data present locally
708+
- `hash` is a string with the hash
709+
- `size` is an integer with the file size in Bytes
710+
- `cumulativeSize` is an integer with the size of the DAGNodes making up the file in Bytes
711+
- `type` is a string that can be either `directory` or `file`
712+
- `blocks` if `type` is `directory`, this is the number of files in the directory. If it is `file` it is the number of blocks that make up the file
713+
- `withLocality` is a boolean to indicate if locality information are present
714+
- `local` is a boolean to indicate if the queried dag is fully present locally
715+
- `sizeLocal` is an integer indicating the cumulative size of the data present locally
716716

717717
If no `callback` is passed, a promise is returned.
718718

@@ -990,10 +990,10 @@ Where:
990990
- `cidBase` is which number base to use to format hashes - e.g. `base32`, `base64` etc (default: `base58btc`)
991991
- `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:
992992

993-
- `name` which is the file's name
994-
- `type` which is the object's type (`directory` or `file`)
995-
- `size` the size of the file in bytes
996-
- `hash` the hash of the file
993+
- `name` which is the file's name
994+
- `type` which is the object's type (`directory` or `file`)
995+
- `size` the size of the file in bytes
996+
- `hash` the hash of the file
997997

998998
If no `callback` is passed, a promise is returned.
999999

0 commit comments

Comments
 (0)