stat | Modular

Mojo function

stat[PathLike: PathLike](path: PathLike) -> stat_result

Get the status of a file or a file descriptor.

Parameters:

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

Args:

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

Returns:

stat_result: Returns the stat_result on the path.

Raises:

If the operation fails.

Thank you! We'll create more content like this.

Thank you for helping us improve!

😔 What went wrong?