jack action said:
Say you have a large text file on your hard drive that you edit such that its content is fully erased and you save it that way. Then you delete the file. Is the content still on the hard drive?
You need to specify more exactly what "fully erased and you save it that way" means. The specific answer might well be application dependent.
If you mean you are editing a text file, and you delete the entire file in your editor so it's empty and then save the file, that would not erase the file's data on disk, it would just release the blocks where the file's data was previously stored into the free pool, which means the OS would be free to overwrite the data if it needs to store new data. But it could be a while before that happens (it would depend on how full your disk is and how much file saving you do).
But not all applications work the same way. Some applications write empty data to disk in place of the old data (meaning, they write to the same blocks on disk where the old data was stored) when you "erase" something. In those cases, the old data would be gone.
jack action said:
Usually, deleting a file only deletes the address where the file is on the hard drive
More precisely, it deletes the tracking entry that points to where the file's data is. Even that is not necessarily straightforward. On Linux, for example, deleting a file just deletes a directory entry; it doesn't necessarily touch the file's inode, which is where the pointer to the actual data is located. The inode gets deleted only if all directory entries that point to it have been deleted.
And even that isn't always the case, since many systems have a "trash can" or something like it, so "deleting" a file doesn't actually mean deleting its directory entry, just moving that entry from the previous directory to the "trash can" directory. To the OS, the file is still pointed to by a directory entry and it still exists as a file. You would have to empty the trash can to actually delete the file as described above.
jack action said:
the content of the file can be restored as long as nothing is written over it.
If you can find the data, yes. The easiest case is if the blocks on the disk that stored the file's old directory entry have not yet been overwritten; then a file restore program can just look at the old directory entry and find the file's data.
It gets harder if the old directory entry has been overwritten by newer data, but it's still not impossible. File restore programs have various tricks to try.