Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@lxf2513/readdir-sync-recursive

luoxiangfan83MIT1.3.2TypeScript support: included

Reads the contents of the directory synchronously and recursively.

readdirSync, fs.readdirSync, recursive, dir, directory, folder, fs

readme

readdir-sync-recursive

Reads the contents of the directory synchronously and recursively.

Like fs.readdirSync('/path/source', { recursive: true }).Compatible with lower versions of nodejs.

Return [] if the path not exist or not a directory

Installation

npm install @lxf2513/readdir-sync-recursive

Usage

import readdirSyncRecursive from '@lxf2513/readdir-sync-recursive'

readdirSyncRecursive('/path/source')

readdirSyncRecursive('/path/source', 'relativePath')

readdirSyncRecursive('/path/source', 'absolutePath')