Creates a unique temporary directory from a prefix string. Adds a six chars suffix. The directory is created with permissions 0700. Returns the directory name. SourceEdit
Creates a unique temporary file from a prefix string. A six-character string will be added. If suffix is provided it will be added to the string The file is created with perms 0600. Returns the filename and a file opened in r/w mode. SourceEdit
Gets system identification from os-release file and returns it as a parsecfg.Config. You also need to import the parsecfg module to gain access to this object. The os-release file is an official Freedesktop.org open standard. Available in Linux and BSD distributions, except Android and Android-based Linux. os-release file is not available on Windows and OS X by design.
import std/parsecfg
when defined(linux):
let data = osReleaseFile()
echo "OS name: ", data.getSectionValue("", "NAME") ## the data is up to each distro.