Description
Discussed in #1639
Originally posted by inputusernamehere November 20, 2021
Thank you for your work on Ionide! I have a minor improvement suggestion:
So right now it's possible to create a new folder in the regular file explorer, then switch to the F#/Ionide view, and create a new file in that folder. Let's say I call the folder new_folder
, and input new_folder/new_file.fs
when I create a new file. It will work as expected.
However if I do not create the folder my self first, I get hit with this error:
Error running command fsharp.explorer.addFile: Could not find a part of the path 'd:\code\ionide-folder-test\new_folder\new_file.fs'.. This is likely caused by the extension that contributes fsharp.explorer.addFile.
I think it would be smoother if Ionide just created the new folder for me.
This is a good first issue. The code implementing this is over in fsautocomplete, specifically the three File.Open calls on the three highlighted methods. I think there should be a helper that parses the passed in file name and creates any necessary directories that are included in the file name.
@inputusernamehere - would you be interested in submitting a PR to fix these? I'd be happy to walk you through the process.