Skip to main content
Log in

Mojo function

isdir

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 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.