package
Create and remove temporary directories with minimal effort
npm install quick-tempGitHub-flavored package documentation.
Across all versions.
Download trend unavailable.
Runtime metadata.
Create and remove temporary directories. Useful for build tools, like Broccoli
plugins. Smart about naming, and placing them in ./tmp if possible, so you
don't have to worry about this.
npm install --save quick-tempvar quickTemp = require('quick-temp');To make a temporary and assign its path to this.tmpDestDir, call either one
of these:
quickTemp.makeOrRemake(this, 'tmpDestDir');
// or
quickTemp.makeOrReuse(this, 'tmpDestDir');If this.tmpDestDir already contains a path, makeOrRemake will remove it
first and then create a new directory, whereas makeOrReuse will be a no-op.
Both functions also return the path of the temporary directory.
An optional third argument lets you override the class-name component of the temporary directory name:
quickTemp.makeOrRemake(this, 'tmpDestDir', 'TreeMerger');
quickTemp.makeOrRemake(this, 'tmpDestDir', this.constructor.name); // defaultTo remove a previously-created temporary directory and all its contents, call
quickTemp.remove(this, 'tmpDestDir');This will also assign this.tmpDestDir = null. If this.tmpDestDir is
already null or undefined, it will be a no-op.
rwjblue
me@rwjblue.com
Estimated unpacked size across 11 packages.
3.7 MB
Includes dependencies.
3 direct · 1 outdated