Function tryRemovePath

If name exists, then delete it regardless of whether it's a file or directory. If it doesn't already exist, do nothing and return false.

bool tryRemovePath(T) (
  T name
)
if (is(T == string) || is(T == Path));

If you want an exception to be thrown if name doesn't already exist, use removePath instead.

Supports Path and command echoing.

Returns

Success?