Oops is a Visual Studio Code extension that converts the file to folder or converts folder to file when they created accidentally.
I also have published a blog post on how you can build a VSCode extension like this yourself. check it out here if you are interesetd.
In case of accidental creation of file instead of a folder, right-click on the folder and convert it to a file.
Same with the accidental file, right-click and swap it with a folder.
✨ Won't convert a directory with children to a file!
✨ Won't convert a not empty file to a directory!
If you found any issue or have any ideas to enhance the project please do not hesitate to open an issue.