tempdir
A Nim library to create and manage temporary directories.
Summary
| Latest Version | Unknown |
|---|---|
| License | BSD3 |
| CI Status | Passing |
| Downloads | 0 |
| Last Indexed | 2026-07-21 05:24 |
Tags
Installation
nimble install tempdir
choosenim install tempdir
git clone https://github.com/euantorano/tempdir.nim
OS Compatibility
| Platform | Linux | macOS | Windows | FreeBSD | OpenBSD | NetBSD | Android | iOS | WASM | Embedded |
|---|---|---|---|---|---|---|---|---|---|---|
| tempdir | ✓ | ✓ | ✓ | - | - | - | - | - | - | - |
Source
| Repository | https://github.com/euantorano/tempdir.nim |
|---|---|
| Homepage | https://github.com/euantorano/tempdir.nim |
| Documentation | View Documentation |
| Registry Source | nimble_official |
README
tempdir
A Nim library to create and manage temporary directories. Inspired by the Rust library of the same name.
Installation
nimble install tempdir
Or add the following to your .nimble file:
# Dependencies
requires "tempdir >= 1.0.1"
Usage
import tempdir
# Create a new temporary directory in the system's temporary directory path, with directories having the prefix `test`.
withTempDirectory(tmp, "test"):
echo "Created temporary directory with path: ", tmp
# At the end of this block, the temporary directory and all of its files will be deleted
# You can also create a temporary directory in a path of your choosing using the `createTempDirectory` procedure
let tmp2 = createTempDirectory("test", "./tmp")
echo "Created temporary directory with path: ", tmp2