Skip to content

anio-fs-org/scandir

Repository files navigation

@anio-fs/scandir

Read a directory recursively.

import {scandir, scandirSync} from "@anio-fs/scandir"

/*
  {
    type: 'file',
    parents: [],
    name: 'example.mjs',
    path: 'examples/example.mjs',
    relative_path: 'example.mjs',
    absolute_path: '/some/path/example.mjs'
  }
*/

console.log(
	await scandir("examples")
)

console.log(
	scandirSync("examples")
)