From cb1c95683a4bca9631e1772104a1085ab00c4406 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Mur=C3=A9?= Date: Wed, 28 Feb 2018 20:00:14 +0100 Subject: [PATCH] complete files.stat with the 'with-local' option --- SPEC/FILES.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/SPEC/FILES.md b/SPEC/FILES.md index 3345fc34..656e2050 100644 --- a/SPEC/FILES.md +++ b/SPEC/FILES.md @@ -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: @@ -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.