tempfiles

0.1.0 • Public • Published

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");
});

Readme

Keywords

none

Package Sidebar

Install

npm i tempfiles

Weekly Downloads

1

Version

0.1.0

License

none

Last publish

Collaborators

  • andris