directory-stream

    0.1.1 • Public • Published

    Directory Stream

    Build Status

    This module provides a streaming interface for scanning directories. It is capable of scanning a single level of a directory as well as recursively scanning directories. It also ships with async and sync flavors.

    Scanning a single level directory

    var directoryStream = require("directory-stream")
    var eventStream     = require("event-stream")
     
    lineStream = eventStream.map(function(file, next) {
      next(false, file + "\n")
    }));
     
    directoryStream("./target/directory").pipe(lineStream).pipe(process.stdout)

    Scanning a nested directories recursively

    var directoryStream = require("directory-stream")
    var eventStream     = require("event-stream")
     
    lineStream = eventStream.map(function(file, next) {
      next(false, file + "\n")
    }));
     
    directoryStream.recursive("./target/directory").pipe(lineStream).pipe(process.stdout)

    Keywords

    none

    Install

    npm i directory-stream

    DownloadsWeekly Downloads

    6

    Version

    0.1.1

    License

    none

    Last publish

    Collaborators

    • josephmoniz