createDirAllSync static method
Creates the directory if it doesn't exist. Will create all non-existing path components.
Returns a Ok
if the directory was created. Otherwise, if the directory cannot be
created the future completes with an Err
of IoError.
Implementation
static Result<(), IoError> createDirAllSync(Path path) {
return Fs.ioGuardSync(
() => Directory(path.asString()).createSync(recursive: true))
.map((_) => ());
}