Skip to content

Return subfiles in paths.dirs #56

@ridhwaans

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 ) {
            ...

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