I am trying to get project folder path in visual studio code extension but very difficult to find the answer. My code is not working. I do not know it is possible or not. I have checked in google no one answer for this question. Anyone know about this please help me to find the answer.
extension.js:
var vscode = require("vscode");
var path = require("path");
exports.activate = context => {
const findPath =
vscode.commands.registerCommand('extension.search', () => {
let findprojectfolderPath = vscode.workspace.uri.fsPath; // Not working
console.log(findprojectfolderPath);
});
}