The Filesystem The file is just an array of bytes (did I say this?) Metadata is unrelated to the file's contents and lives elsewhere The fs includes an "inode" struct, for metadata (size, owner, on-disk placement) Inodes are enumerated: device+inum identifies a unique file For names, we have directories: just lists of names and inums Names are completely arbitrary strings of bytes Not really: the separator and null-byte are forbidden This overly-simple approach brings in interesting side effects You can rename or remove a file that is in use, and it works Files can have several names, and it works Files can have no name at all, and it works The filesystem ignores local-language encoding, and it works Names are case-sensitive (and anydifference-sensitive) So, the filesystem is just a database, whose data items are files And system programs are the queries acting on it