dirls - Get directory contents and metadata

Build Status

Install

npm i @georgenet/dirls

Usage

const dirls = require('@georgenet/dirls')
console.log(dirls('path'))

Out:

[
	{
		name: "file.txt" // File name
		type: "file" // Can be 'device', 'directory', 'FIFOpipe', 'file', 'socket', 'symlink' or 'unknown'
		stats: {} // fs.Stats object
	}
]