is_dir¶

is_dir(file)[source]¶

Check if file is a directory.

Thin wrapper around Path.is_dir() to handle multiple input types.

Parameters:

file (Union[str, Path, bytes]) – The file to check.

Returns:

A boolean indicating whether file is a directory.

Return type:

bool