Skip to content

tempDir ​

Returns a TempDir struct with a path field containing the system's temporary directory path.

SignaturetempDir(): TempDir

TempDir fields ​

FieldTypeDescription
pathstringThe path to the system temp directory.

Example ​

tyrus
import { tempDir } from "tyrus:fs";

const dir = tempDir();
print(dir.path); // "/tmp"