Mojo function
dirname
dirname[PathLike: PathLike, //](path: PathLike) -> String
Returns the directory component of a pathname.
Parameters:
- PathLike (
PathLike
): The type conforming to the os.PathLike trait.
Args:
- path (
PathLike
): The path to a file.
Returns:
The directory component of a pathname.
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!
😔 What went wrong?