API Reference › Os › Os.temp_dir
method

Os.temp_dir

Os.temp_dir() -> string

The system temporary directory (from TMPDIR, falling back to /tmp) — for short-lived scratch files that need not survive a restart.

Example

program TempDir {
  entry {
    let dir = Os.temp_dir()
    print(len(dir))
  }
}
← All symbols