Quote:
Originally Posted by Objective Zero
Hey,
In my project, I accidentally deleted a .m file for my main view controller. My .h is still there its just that the .m is missing. I have not copied the project in finder to anywhere. And I think I emptied my trash and restarted my computer.
Is there any way to get the file back? I had so much code in there and now that file is gone AFAIK.
Thanks!
|
Check to see if the file is in the folder, but not in the project. When you delete a file from an XCode project it asks if you want to delete the file or just the reference.
There are file recovery utilities that can recover deleted files, but they usually only work if you stop what you're doing and run them immediately after deleting the file, before you save ANYTHING else onto the disk. The problem is that the disk sectors containing the contents of the deleted file get marked as empty, and other file content gets written into those sectors pretty quickly.
Get thee to a source control system! Messing up and making changes you regret is inevitable. If you had your files in a git or subversion repository, recovering from something like this is trivial.