removeDir static method

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

Removes an empty directory.

Implementation

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