1.0.0 • Published 8 years ago
home-files v1.0.0
home-files
List all files in the home directory
const homeFiles = require('home-files');
(async () => await homeFiles() /* => Set {
'/Users/shinnn/.DS_Store',
'/Users/shinnn/.bash_history',
'/Users/shinnn/.bash_profile',
'/Users/shinnn/.bashrc',
'/Users/shinnn/.gitconfig',
...
'/Users/shinnn/.zshrc'
} */)();Installation
npm install home-filesAPI
const homeFiles = require('home-files');homeFiles(options)
options: Object (used as readdir-sorted options)
Return: Promise<Set<string>>
The promise will be fulfilled with a Set of strings — absolute paths of all files included in the home directory. Symbolic links and directories are excluded.
Options are directly passed to the underlying readdir-sorted to control the order of results.
License
ISC License © 2017 - 2018 Shinnosuke Watanabe