1373
Deleting Files
(lemmy.ml)
Welcome to Programmer Humor!
This is a place where you can post jokes, memes, humor, etc. related to programming!
For sharing awful code theres also Programming Horror.
Good to know, and helps me understand code dealing with filesystems a little better. I'm curious how the kernel keeps track of it all, just a counter maybe?
Is that different on other systems?
I don't know how NTFS does it, but on FAT filesystems the directory table contains the filename along with all the other file metadata (access rights, creation date, size, etc). Only the list of sectors containing the actual data is separate. That means that you can't have two filenames for the same file on FAT filesystems.
If you want to learn more about this, the data structure UNIX filesystems use, and FAT filesystems lack is called inode.