blex41 / non-recursive-folder-copy

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Folder copy with no recursion

This is a demo for a StackOverflow question. It will copy the contents of the node_modules folder into a copy folder, using NodeJS.

It copies the folder recursively (meaning that all subfolders will be explored as well), but it does not use function recursion. Instead, it uses a queue, which gets filled by an auxiliary function which we run in a loop.

Usage

# Clone the repo
git clone git@github.com:blex41/non-recursive-folder-copy.git
# Go into the project
cd non-recursive-folder-copy
# Install dependencies
npm i
# Run the demo
npm start

About


Languages

Language:JavaScript 100.0%