async getRootFolderPath()

in src/controller/directoryController.ts [45:59]


  async getRootFolderPath() {
    const assayConfig = vscode.workspace.getConfiguration("assay");
    const rootFolder = assayConfig.get<string>("rootFolder");

    // check if the folder still exists. if it doesn't, prompt the user to select a new one
    if ((rootFolder && !fs.existsSync(rootFolder)) || !rootFolder) {
      const newRootFolder = await RootView.selectRootFolder();
      if (!newRootFolder) {
        throw new Error("No root folder selected");
      }
      await this.storeRootFolderSetting(newRootFolder);
      return newRootFolder;
    }
    return rootFolder;
  }