🚀 DAY 4 OF LAUNCH WEEK: Introducing GitHub Actions Scanning Support.Learn more →
Socket
Book a DemoInstallSign in
Socket

simply-get-files

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

simply-get-files

Recursively get all the files in a directory

latest
Source
npmnpm
Version
1.0.2
Version published
Maintainers
1
Created
Source

simply-get-files

Recursively get all the files in a directory.

const getFiles = require('simply-get-files');

(async function() {
	const files = await getFiles(`static`);
	// -> [ `global.css`, `fonts/font1.woff`, `images/background.png`, `images/web/small/loading.gif`]
})();

See test/index.js for more information.

API

getFiles(directory?: string) => Promise<string[]>

The default directory is process.cwd().

If the directory does not exist, an empty array is returned.

This package only returns the files in a directory. Empty folders are ignored.

License

MIT

Keywords

files

FAQs

Package last updated on 07 Nov 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts