Skip to main content

Mojo function

mkdtemp

mkdtemp(suffix: String = "", prefix: String = "tmp", dir: Optional[String] = 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): Directory in which the directory will be created.

Returns:

String: The name of the created directory.

Raises:

If the directory can not be created.

Was this page helpful?