Skip to content

Instantly share code, notes, and snippets.

View piotr-placzek's full-sized avatar

Piotr Płaczek piotr-placzek

View GitHub Profile
@piotr-placzek
piotr-placzek / tree.js
Last active December 21, 2021 18:02
js recursive list files
const path = require('path');
const fs = require('fs-extra');
/**
* @param {String} rootDirectory
* @param {String[]} exclude
* @returns {String[]}
*/
function tree(rootDirectory, exclude) {
const getAllFiles = function (dirPath, exclude, arrayOfFiles) {