If you delete a file in an error, you can use the Code Playback option to find that file. Please follow the below steps to recover a deleted file:
Open the assignment then go to Tools -> Code Playback.
Click on the folder icon.
Find the file which you have deleted.
Review the file and it will show how it was built
You can find your last saved work by clicking on the Previous change, Play/Pause, and Next change buttons (from left to right) or by dragging the timeline bar along
You can create a new file and copy/paste from the code playback into a new file that you created.
Note: If you don't have Tools -> Code Playback, right-click on a tab or in the file tree and select Code Playback