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

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

@mbieser

Description

@mbieser

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions