Have ideas to improve npm?Join in the discussion! »

    creap

    1.0.0 • Public • Published

    Creap

    reap, but rewritten with promises. Delete files in a folder older than a certain time.

    • Only asynchronous file calls are used
    • Doesn't support folder/file filtering yet
    • Doesn't support concurrency

    API

    var creap = Creap()

    Initialize a new creaper.

    var Creap = require('creap')
    var creap = Creap()

    creap.threshold=

    Set the maximum mtime age. Could either be milliseconds or a human string like 30 minutes.

    creap.watch(dir)

    Watch a directory to recursively look for old files.

    creap.run().then()

    Delete all the old files in all the directories.

    var interval = creap.setInterval([onerror], [interval])

    Run the reaper on an interval. If an error occurs, onerror(err) is called, defaulting to console.error(err.stack).

    Keywords

    none

    Install

    npm i creap

    DownloadsWeekly Downloads

    1

    Version

    1.0.0

    License

    MIT

    Last publish

    Collaborators

    • avatar
    • avatar