Skip to main content

is_occupied_error

Function is_occupied_error 

Source
pub fn is_occupied_error(error: &Error) -> bool
Expand 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;