stat method
Display file status. For more: https://docs.ipfs.io/reference/http/api/#api-v0-files-stat
Implementation
Future<dynamic> stat(
{required String dir, Map<String, dynamic> params = const {}}) async {
_checkDir(dir);
var _params = {'arg': dir, ...params};
try {
var response = await _ipfsService.post(
url: '$url/api/v0/files/stat?',
queryParameters: _params,
authorizationToken: authorizationToken);
return response;
} on DioError catch (e) {
// The request was made and the server responded with a status code
// that falls out of the range of 2xx and is also not 304.
if (e.response != null) {
return e.response?.data;
}
}
}