code: function Prompt () {
    Base.apply(this, arguments);
  
    if (!this.opt.basePath) {
      this.throwParamError('basePath');
    }
  
    this.pathIndexHash = {};
    this.originalBaseDir = this.currentPath =
      path.normalize(path.isAbsolute(this.opt.basePath) ?
        path.resolve(this.opt.basePath) : path.resolve(process.cwd(), this.opt.basePath));
  
    if (String(this.currentPath).endsWith(path.sep)) {
      this.currentPath = String(this.currentPath).slice(0, -1);
    }
  
    this.onlyOneFile = !!this.opt.onlyOneFile;
  
    this.opt.choices = new Choices(this.createChoices(this.currentPath), this.answers);
    this.selected = 0;
  
    if (this.opt.filterItems) {
      assert(typeof this.opt.filterItems === 'function', ' "filterItems" option property must be a function.');
    }
  
    this.firstRender = true;
  
    // Make sure no default is set (so it won't be printed)
    this.opt.default = null;
    this.searchTerm = '';
    this.paginator = new Paginator();
  }
docs: stores what index to use for a path if you go back a directory 
  Constructor