/* eslint-disable no-sync */ import { dirname, join, sep, basename } from 'path'; import fs from 'fs-extra'; function read_dir (dir:string, exclude_files:boolean):string[] { const contents = fs.readdirSync (dir); contents.unshift ('..'); if (exclude_files) { return contents.filter ((c) => { const full_path = join (dir, c); try { return fs.statSync (full_path) .isDirectory (); } catch { return false; } }); } return contents; } interface PathPromptOptions { starting_dir?: string; folders_only?: boolean; } export class PathPrompt { private _options: PathPromptOptions; public constructor (options:PathPromptOptions) { this._options = options; } }