You're correct on the pointers...
FIRST: something on the organization of data on the disk
The harddrive (and floppy drive too...) is made up of small blocks. Each block can hold a little piece of data.
A file that is larger than a single block gets its data written in the first available block (say nr 100). When that block is full it goes on to write thing in the next avail. block (say 101). Now in block 100 it will write that the file is continued in block 101.
So you could have a file in blocks like this:
100 -> 101 -> 200 -> 201
(the system will ofcourse skip blocks that are already occupied by data from other files)
Now in the FAT there is a list like this:
File1 (starts at) -> 103
File2 (starts at) -> 100
File3 etc.
Now if you remove File1 you'll have this:
(first character remove denotes a free 'chain')
?ile1 (starts at) -> 103
File2 (starts at) -> 100
File3 etc.
This allows the system to find free blocks (just follow the trail from "?ile1". It does not need to actually empty the contents or remove the links (between 100 and 101).
essentially keeping the file intact.
---> I'm assuming you're aware that computer information is stored in bits and bytes for the next answer
On to the more technical side: You're father is right!
A harddisk consists of spinning disks and a head (like a vinyl record player)
the disk has a rough surface consisting of many (very, very small) pieces of metal. By using a magnet, you can point these pieces of metal in different directions.
The head has a very small electromagnet that can point each of these pieces of metal independently.
These pieces of metal are commonly called 'bits' They can have 2 values: 0 and 1 (or on the disk: 'left' and 'right' pointing)
When you write a file to disk the head looks up an empty spot (it can also 'feel' the bits) and constantly manipulates these free bits to make a pattern that matches your file.
The Fat is somewhat like any other information on the disk, it needs to be written with that head. So when you delete a file, the system changes the first character of the filename in the FAT, by rearranging that part of the disk... Just so it matches '?ile1' instead of 'File1'
Notes:
- These are the basics probably many people could elaborate or even correct me, but the essence should be correct.
- The actual emptying of a file (overwriting its contents) amounts to all '0's as the file pattern.
- I've used a '?' to mark an empty character.
Hope I've helped answer your question....
__________________
"Do not kill. Do not rape. Do not steal. These are principles which every man of every faith can embrace. "
- Murphy MacManus (Boondock Saints)
|