axiodb
Version:
The Pure JavaScript Alternative to SQLite. Embedded NoSQL database for Node.js with MongoDB-style queries, zero native dependencies, built-in InMemoryCache, and web GUI. Perfect for desktop apps, CLI tools, and embedded systems. No compilation, no platfor
17 lines (16 loc) • 646 B
TypeScript
/**
* Recursively counts the number of files in a folder and its subfolders.
*
* This function traverses through the directory structure starting from the provided folder path
* and counts all files encountered during the traversal. It does not count directories themselves.
*
* @param folderPath - The path to the folder to count files in
* @returns A promise that resolves to the total number of files found
*
* @example
* ```typescript
* const count = await countFilesRecursive('/path/to/folder');
* console.log(`Total files: ${count}`);
* ```
*/
export default function countFilesRecursive(folderPath: string): Promise<number>;