mihneadb / node-directory-tree

Convert a directory tree to a JS object.
MIT License
523 stars 106 forks source link

Recursive #81

Open tomaswilhelmsson opened 3 years ago

tomaswilhelmsson commented 3 years ago

Added option "recursionDepth" to limit the depth the directory-tree is searched. Noticed this when i tried to read DS-18b20 temperature sensor that for some reason /sys/bus/w1/devices has a endless recursive tree.

Added tests and updated other tests to work accomidate for the test_data folders new structure.

dirTree('/sys/bus/w1/devices', { recursionDepth: 4 }); for example to go 4 levels deep.