Skip to main content

function

isdir

isdir(path: String) -> Bool

Return True if path is an existing directory. This follows symbolic links, so both islink() and isdir() can be true for the same path.

Args:

  • path (String): The path to the directory.

Returns:

True if the path is a directory or a link to a directory and False otherwise.

isdir[pathlike: PathLike](path: pathlike) -> Bool

Return True if path is an existing directory. This follows symbolic links, so both islink() and isdir() can be true for the same path.

Parameters:

  • pathlike (PathLike): The a type conforming to the os.PathLike trait.

Args:

  • path (pathlike): The path to the directory.

Returns:

True if the path is a directory or a link to a directory and False otherwise.