node_modules/@sveltejs/kit/dist/cli.js
/**
 * Get a list of all files in a directory
 * @param {string} cwd - the directory to walk
 * @param {boolean} [dirs] - whether to include directories in the result
 */
Get a list of all files in a directory
@param {string} cwd - the directory to walk
@param {boolean} [dirs] - whether to include directories in the result
Get a list of all files in a directory @param { string } cwd - the directory to walk @param { boolean } [ dirs ] - whether to include directories in the result
function walk(cwd, dirs = false) {
	const all_files = [];
	function walk_dir(dir) {
		const files = fs__default.readdirSync(path__default.join(cwd, dir));
		for (const file of files) {
			const joined = path__default.join(dir, file);
			const stats = fs__default.statSync(path__default.join(cwd, joined));
			if (stats.isDirectory()) {
				if (dirs) all_files.push(joined);
				walk_dir(joined);
			} else {
				all_files.push(joined);
			}
		}
	}
	return walk_dir(''), all_files;
}
function walk ( cwd , dirs = false ) { const all_files = [ ] ; function walk_dir ( dir ) { const files = fs__default . readdirSync ( path__default . join ( cwd , dir ) ) ; for ( const file of files ) { const joined = path__default . join ( dir , file ) ; const stats = fs__default . statSync ( path__default . join ( cwd , joined ) ) ; if ( stats . isDirectory ( ) ) { if ( dirs ) all_files . push ( joined ) ; walk_dir ( joined ) ; } else { all_files . push ( joined ) ; } } } return walk_dir ( '' ) , all_files ; }
Get a list of all files in a directory
 @param {string} cwd - the directory to walk
 @param {boolean} [dirs] - whether to include directories in the result
Get a list of all files in a directory @param { string } cwd - the directory to walk @param { boolean } [ dirs ] - whether to include directories in the result
/** @type {string[]} */ /** @param {string} dir */