Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

traverseTree should work when a regular file is passed in #43

Open
mbieser opened this issue Dec 6, 2017 · 0 comments
Open

traverseTree should work when a regular file is passed in #43

mbieser opened this issue Dec 6, 2017 · 0 comments

Comments

@mbieser
Copy link

mbieser commented Dec 6, 2017

Robustness enhancement.
Should work when passed the path to a regular (non-directory) file:

fs.traverseTreeSync('/home/vagrant/projs/api-core-js/package.json', function(path) { console.log(path);},function(path) { console.log(path);} );
undefined

Works fine when given a directory.

fs.traverseTreeSync('/home/vagrant/projs/api-core-js/', function(path) { console.log(path);},function(path) { console.log(path);} );
/home/vagrant/projs/api-core-js/.git
/home/vagrant/projs/api-core-js/.gitignore
/home/vagrant/projs/api-core-js/.ib_meta
/home/vagrant/projs/api-core-js/Makefile
/home/vagrant/projs/api-core-js/docker
/home/vagrant/projs/api-core-js/lib
/home/vagrant/projs/api-core-js/log
/home/vagrant/projs/api-core-js/node_modules
/home/vagrant/projs/api-core-js/package.json
/home/vagrant/projs/api-core-js/scratch
/home/vagrant/projs/api-core-js/test
undefined

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant