fileNeedFuture method

Future<MessageOrError> fileNeedFuture(
  1. String innerPath, {
  2. int timeout = 300,
  3. int priority = 6,
})

Return: "ok" on successful download.

Implementation

Future<MessageOrError> fileNeedFuture(
  String innerPath, {
  int timeout = 300,
  int priority = 6,
}) async {
  var resultStr = await ZeroNet.instance.cmdFuture(
    ZeroNetCmd.fileNeed,
    params: {
      'inner_path': innerPath,
      'timeout': timeout,
      'priority': priority,
    },
  );
  return resultStr.toMsgOrErr;
}