Spidey Boy 🕷 🕸
A simple utility for crawling a file system.
Installation
npm install spidey-boy
Working with Spidey Boy
The utility has perhaps the simplest API possible, with only a single method:
Promise = spideyBoy.crawl(pathToRootDirectory, actionPerFile, options?)
Where:
pathToRootDirectory
is a string pointing to a directory to crawl. This can be absolute or relative to the current working directoryactionPerFile
is a function that will be executed per file found. It receives an absolute path to the file as its sole argumentoptions
an optional object with the following propertiesexclude
an array of strings containing directories or files to exclude from the crawl