Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 LICENSE
Octocat-spinner-32 README.md
Octocat-spinner-32 index.js
Octocat-spinner-32 package.json
README.md

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");
});
Something went wrong with that request. Please try again.