fs-explorer-ui

1.0.8 • Public • Published

(fs-explorer-ui) Node Terminal File Explorer

A simple package for exploring directories in terminal around your project.

Install

$ npm install fs-explorer-ui

Usage

Promise

const fsExplorerUI = require('fs-explorer-ui');
 
new fsExplorerUI({
    startPath: 'D:/your/path',
    message: 'This message will displayed above folder list',
    isolate: true
}).then(yourPath => { // Promise, return absolute path of the selected file/directory
    console.log('You choose file/directory', yourPath)
});

async, await

async function example() {
    const yourPath = await new fsExplorerUI({
     startPath: 'D:/your/path',
     message: 'This message will displayed above folder list',
     isolate: true
    });
};

Options

Option Default Value Description
startPath process.cwd() Absolute path from which you start browsing the folders.
message undefined Message that will be displayed above the folder structure.
isolate false Set 'true' if you want to forbid going beyond 'startPath'

This is on GitHub so let me know if I've broken it somewhere.

Package Sidebar

Install

npm i fs-explorer-ui

Weekly Downloads

1

Version

1.0.8

License

ISC

Last publish

Collaborators

  • serchiichuk