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

Reading files only with depthLimit:0 also reads directories. #10

Closed
HyperGrapher opened this issue May 29, 2018 · 2 comments · Fixed by #12
Closed

Reading files only with depthLimit:0 also reads directories. #10

HyperGrapher opened this issue May 29, 2018 · 2 comments · Fixed by #12

Comments

@HyperGrapher
Copy link

HyperGrapher commented May 29, 2018

example:
const files = klawSync(os.homedir()+'/Documents', {nodir: true, depthLimit: 0});

with above line i get the file and directory names. But dir names are just truncated file path in children.
result-> file.txt, dirname, dirname2
directory names are actually pointing to the files in child directories but truncated.
i.e -> dirname/file-in-child.txt

@Geelik
Copy link
Contributor

Geelik commented Jun 19, 2018

Hey, i confirm i have the same issue.
So to "fix" i use a filter filter({stats}){ return stats.isFile(); }

@manidlou
Copy link
Owner

Sorry for the late reply! I've been so busy lately. I'll look into it. In the meantime, any help is welcome!

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

Successfully merging a pull request may close this issue.

3 participants