Thread: i got a 'FAT' question ^^

  1. #1
    Registered User MicroFiend's Avatar
    Join Date
    Nov 2002
    Posts
    80

    i got a 'FAT' question ^^

    just wondering, taking a random file from the hard disk, correct me if im wong, the program basicly locates the offset and size by referencing the filename with the FAT, then reads directly from the HDD given the offset, so if i was to open a file for binary output and i wrote from the offset to the sizeof the file then i would effectively be permanantly overwriting the files data, so say if it was an inportant document, by reading the file and write'ing (char)0; until the end of file, am i actualy overwriting the files contents? in efect formating a specified part of the HDD? rather than deleting a file (just removing it from FAT) im Shredding the file so to speak... or does it not work like this?

    any ideas? thinking of making a software "file shredder"
    You can stop change as easily as u can drink the sea with a fork

  2. #2
    Unregistered User
    Join Date
    Sep 2005
    Location
    Antarctica
    Posts
    341
    well, it's a little more complicated than that because a file can be fragmented, but you have the general idea right, and it wouldn't be considered "formatting" it, it would be considered overwriting it. Formatting it means to format that section of data with the filesystem data structures, a complete different concept. Before making a file shredder, if you want to do it at the low file system level, you would need to study and understand the structure of FAT, and any other file system that you are going to support. To me, it would seem easier to just use the operating system to open the file and write over the file with all 0s, you don't need to know about the file system structure for this.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Question...
    By TechWins in forum A Brief History of Cprogramming.com
    Replies: 16
    Last Post: 07-28-2003, 09:47 PM
  2. opengl DC question
    By SAMSAM in forum Game Programming
    Replies: 6
    Last Post: 02-26-2003, 09:22 PM
  3. Question about linked lists.
    By cheeisme123 in forum C++ Programming
    Replies: 6
    Last Post: 02-25-2003, 01:36 PM
  4. Question, question!
    By oskilian in forum A Brief History of Cprogramming.com
    Replies: 5
    Last Post: 12-24-2001, 01:47 AM
  5. Hi to all! First question, please don't eat me... ^^;;
    By ncrfgs in forum A Brief History of Cprogramming.com
    Replies: 5
    Last Post: 12-15-2001, 03:36 AM