fileWriteFuture method

Future<MessageOrPromptOrError> fileWriteFuture(
  1. String inner_path,
  2. String content_base64, [
  3. bool ignore_bad_files = false
])

Return: "ok" on success, the error message otherwise.

Implementation

Future<MessageOrPromptOrError> fileWriteFuture(
  String inner_path,
  String content_base64, [
  bool ignore_bad_files = false,
]) async {
  var resultStr = await ZeroNet.instance.cmdFuture(
    ZeroNetCmd.fileWrite,
    params: {
      'inner_path': inner_path,
      'content_base64': content_base64,
      'ignore_bad_files': ignore_bad_files,
    },
  );
  return resultStr.toMsgOrPromptOrErr;
}