pub fn is_occupied_error(error: &Error) -> boolExpand description
What:
Whether a rename failed because another directory already holds the name.
Why:
rename onto a non-empty directory fails with EEXIST or ENOTEMPTY on Unix and
with an access-denied error on Windows (Node’s EPERM);
the incumbent’s
isOccupiedError accepts exactly these.
In TS you’d write (pseudocode):
function isOccupiedError(error: unknown): boolean;