Mojo function
exists
exists[PathLike: PathLike, //](path: PathLike) -> Bool
Return True if path exists.
Example:
from std.os.path import exists
exists("/tmp") # returns True
exists("noexist") # returns FalseParameters:
- PathLike (
PathLike): The type conforming to the os.PathLike trait.
Args:
- path (
PathLike): The path to the directory.
Returns:
Bool: Returns True if the path exists and is not a broken symbolic link.
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!