No description
Find a file
Euan 2b419f5bdc
Fixed #1 - undeclared identifier 'random' (#2)
* Fixed #1 - undeclared identifier 'random'

* Only build on pushes to master and PRs.
2021-03-25 16:38:41 +00:00
.github/workflows Fixed #1 - undeclared identifier 'random' (#2) 2021-03-25 16:38:41 +00:00
src Fixed #1 - undeclared identifier 'random' (#2) 2021-03-25 16:38:41 +00:00
tests Fixed #1 - undeclared identifier 'random' (#2) 2021-03-25 16:38:41 +00:00
.editorconfig Initial commit 2017-04-25 13:18:39 +01:00
.gitignore Fixed #1 - undeclared identifier 'random' (#2) 2021-03-25 16:38:41 +00:00
LICENSE Fixed #1 - undeclared identifier 'random' (#2) 2021-03-25 16:38:41 +00:00
README.md Fixed #1 - undeclared identifier 'random' (#2) 2021-03-25 16:38:41 +00:00
tempdir.nimble Fixed #1 - undeclared identifier 'random' (#2) 2021-03-25 16:38:41 +00:00

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