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

Commit

Permalink
complete files.stat with the 'with-local' option
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelMure authored Feb 28, 2018
1 parent 59bd7ac commit cb1c956
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions SPEC/FILES.md
Original file line number Diff line number Diff line change
Expand Up @@ -618,6 +618,7 @@ Where:
- `options` is an optional Object that might contain the following keys:
- `hash` is a Boolean value to return only the hash.
- `size` is a Boolean value to return only the size.
- `with-local` is a Boolean value to compute the amount of the dag that is local, and if possible the total size.

`callback` must follow the `function (err, stat) {}` signature, where `err` is an Error if the operation was not successful and `stat` is an Object with the following keys:

Expand All @@ -626,6 +627,10 @@ Where:
- `cumulativeSize` is an integer with the cumulative size in Bytes.
- `blocks` is an integer indicating the number of blocks.
- `type` is a string that can be either `directory` or `file`.
- `withLocality` is a boolean to indicate if locality information are present.
- `local` is a boolean to indicate if the queried dag is fully present locally.
- `sizeLocal` is an integer indicating the cumulative size of the data present locally.


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

Expand Down

0 comments on commit cb1c956

Please sign in to comment.