Skip to content

AndrewMusgrave/readdir-sync-recursive

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

readdirSyncRecursive

Read a directory recursively.

Install

npm install readdir-sync-recursive

Usage

// list of directories
const readdirSync = require('readdir-sync-recursive')
const readdirSync('./src');

// with callbacks
const readdirSync = require('readdir-sync-recursive')
const readdirSync('./src', onDir, onFile);

// ingore callback
const readdirSync = require('readdir-sync-recursive')
const readdirSync('./src', null, null, ignoreDir);

API

readdirSync(dir, onDir, onFile, ignoreDir)

Param Type Default Description
dir string directory path
onDir (filePath: string): void or any callback with a directory is found
onFile (filePath: string): void or any callback with a file is found
ignoreDir ?(filePath: string): boolean or undefined (): false function to determine if a file or directory should be ignored

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published