Skip to content

Return subfiles in paths.dirs #56

Description

@ridhwaans

Is there a way to iterate the files in the paths.dirs returned by node-dir? It also returns paths.files but they are not necessarily in the same subdir

I want to avoid rereading dirs like:

 ...
root_dir.subdirs(__dirname, function(err, subdirs) { // read root_dir
    if (err) throw err;
    map(subdirs, function(dir){ // for each dir in subdirs
    fs.readdir( dir, function( err, files ) { // read dir
            if(err) console.log(err)
            files.forEach( function( file, index ) {
            ...

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions