I'm new to creating extension in vscode. I am creating an extension that loads the file using 'fs' and make some changes to the file and write back the file. it works flawlessly for a file that is saved. But it shows:
Error: ENOENT: no such file or directory
for unsaved/untitled file.
I used const loc = vscode.window.activeTextEditor.document.uri.fsPath;
can someone please help me how to get the location of unsaved/untitled file.