Function removePath

Delete name regardless of whether it's a file or directory. If it's a directory, it's deleted recursively, via rmdirRecurse. Throws if the file/directory doesn't exist.

void removePath(T) (
  T name
)
if (is(T == string) || is(T == Path));

If you just want to make sure a file/dir is gone, and don't care whether it already exists or not, consider using tryRemovePath instead.

Supports Path and command echoing.