Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

match pattern for folder names? #48

Open
QAscoop opened this issue Apr 18, 2017 · 0 comments
Open

match pattern for folder names? #48

QAscoop opened this issue Apr 18, 2017 · 0 comments

Comments

@QAscoop
Copy link

QAscoop commented Apr 18, 2017

Is it possible to use match pattern in folder or subfolder names similar to readFiles?

Here is an example file structure:

topFolder/
 -- myFiles/
 ---- file1.txt
 ---- file2.txt
-- otherFiles/
 ---- otherFile.htm
 ---- anotherFile.htm

I want to get the list of files inside "myFiles".
The following code does not work:

dir.paths(folder, {
 match: /Tests/
 }, function(err, paths) {
  if (err) {
   console.log(err);
  }
  console.log("Folders FOUND: ", paths.dirs);
  console.log("FILES FOUND: ", paths.files);
 });
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant