stat method

Future stat({
  1. required String dir,
  2. Map<String, dynamic> params = const {},
})

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;
    }
  }
}