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

Commit cb1c956

Browse files
authored
complete files.stat with the 'with-local' option
1 parent 59bd7ac commit cb1c956

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

SPEC/FILES.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -618,6 +618,7 @@ Where:
618618
- `options` is an optional Object that might contain the following keys:
619619
- `hash` is a Boolean value to return only the hash.
620620
- `size` is a Boolean value to return only the size.
621+
- `with-local` is a Boolean value to compute the amount of the dag that is local, and if possible the total size.
621622

622623
`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:
623624

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

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

0 commit comments

Comments
 (0)