home-files

1.0.0 • Public • Published

home-files

npm version Build Status Coverage Status

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

Use npm.

npm install home-files

API

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

Package Sidebar

Install

npm i home-files

Weekly Downloads

1

Version

1.0.0

License

ISC

Unpacked Size

3.51 kB

Total Files

4

Last publish

Collaborators

  • shinnn