Skip to main content
Log in

Mojo function

mkdtemp

mkdtemp(suffix: String = String(""), prefix: String = String("tmp"), dir: Optional[String] = Optional(None)) -> String

Create a temporary directory. Caller is responsible for deleting the directory when done with it.

Args:

  • suffix (String): Suffix to use for the directory name.
  • prefix (String): Prefix to use for the directory name.
  • dir (Optional[String]): Directory in which the directory will be created.

Returns:

The name of the created directory.

Raises:

If the directory can not be created.