Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

20 lines (12 sloc) 0.455 kb

TEMPFILES

Tempfiles removes all files from a directory.

Installation

npm install tempfiles

Usage

  • cleanPeriodically(dir, ttl, callback) - starts a timer to clean files that are older than ttl (in seconds)

Example:

var tempfiles = require("tempfiles");

tempfiles.cleanPeriodically("/tmp/ttl", 60, function(err, timer){
    if(!err)
        console.log("Cleaning periodically directory /tmp/ttl");
});
Jump to Line
Something went wrong with that request. Please try again.