maxdirs

0.0.8 • Public • Published

maxdirs

A utility to trim the subdirectories in a directory based on a maximum, deletes oldest first.

Installation

As a command line tool

$ [sudo] npm install -g maxdirs

As a libary $ npm install maxdirs

Command line

$ maxdirs

If the number of sub-directories within directory exceeds maxNumberOfSubdirectories, the necessary count will be recursively deleted.

As a library

$ var maxdirs = require('maxdirs');

$ maxdirs.purge(directory, maxNumberOfSubdirectories, callback);

callback takes (err, numberDeleted).

See test/purge.js for an example.

/maxdirs/

    Package Sidebar

    Install

    npm i maxdirs

    Weekly Downloads

    0

    Version

    0.0.8

    License

    none

    Last publish

    Collaborators

    • devinesy