1.0.0 • Published 11 months ago

simple-read-dir v1.0.0

Weekly downloads
-
License
MIT
Repository
-
Last release
11 months ago

Read Directory

Installation

npm install simple-read-dir

Usage

// Add to project
const readDirectory = require('simple-read-dir');
// OR 
import readDirectory from 'simple-read-dir';

// Basic usage
const { files, folders } = await readDirectory(path, options);

// Recursive
const tree = await readDirectory(path, options, depth)

// Options
{
  file?: boolean; // Files only
  dir?: boolean; // Directories only
  size?: boolean; // With sizes 
  search?: string; // Filter results
  ext?: string; // Filter by extension
  all?: boolean; // Include hidden files
}

(c) 2023 Tristan Collicott

1.0.0

11 months ago