removeFile static method

FutureResult<(), IoError> removeFile(
  1. Path path
)

Removes a file.

Implementation

static FutureResult<(), IoError> removeFile(Path path) async {
  return await Fs.ioGuard(() async {
    return await File(path.asString()).delete(recursive: false);
  }).map((_) => ());
}