mkdir method

Future mkdir({
  1. required String dir,
})

Implementation

Future<dynamic> mkdir({required String dir}) async {
  _checkDir(dir);
  var params = {
    'arg': dir,
    'parent': true,
  };
  try {
    var response = await _ipfsService.post(
        url: '$url/api/v0/files/mkdir?',
        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;
    }
  }
}