fileGetFuture method

Future<MessageOrError> fileGetFuture(
  1. String inner_path, {
  2. bool required_ = true,
  3. String format = 'text',
  4. int timeout = 300,
  5. int priority = 6,
})

Return: The content of the file.

Implementation

Future<MessageOrError> fileGetFuture(
  String inner_path, {
  bool required_ = true,
  String format = 'text',
  int timeout = 300,
  int priority = 6,
}) async {
  var resultStr = await ZeroNet.instance.cmdFuture(
    ZeroNetCmd.fileGet,
    params: {
      'inner_path': inner_path,
      'required': required_,
      'format': format,
      'timeout': timeout,
      'priority': priority,
    },
  );
  return resultStr.toMsgOrErr;
}