Your computer’s storage is simply a vast sea of 1s and 0s that any program can use.
When one of them wants to create a file, it asks the operating system to allocate a portion of the hard disk to them. The OS then stores an entry saying “file A.txt is using bytes 1000 to 1500”. B.txt might be using bytes 2050 to 5000, and so on. New files simply find an unused range and “claim” it.
When a file is deleted, the operating system just has to delete the entry in its index that it made for that file. The bytes themselves are left untouched. In the future, any other file looking for space can claim that range for itself and overwrite the data that was previously there.
This is how file recovery software is able to work. After the file is “deleted”, the software can still read the bytes on the disk and, as long as no other file has been written to the same location, recreate the original one.
Latest Answers