Skip to content

Path.rmdirSync() method

pathlib-ts > Path > rmdirSync

Remove the directory synchronously.

Signature:

rmdirSync(): void;

Returns:

void

Mirrors Path.rmdir() but executes synchronously.

Clearing an empty directory synchronously

import { Path } from "pathlib-ts";
const tmp = new Path("./tmp/output");
tmp.rmdirSync();