removeDirAll static method

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

Removes a directory at this path, after removing all its contents. Use carefully!

Implementation

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