A filesystem provides a namespace for files and directories. The filesystem makes use of a block-structured device like a hard disk in order to provide the illusion of files stored in directories.
The filesystem is responsible for allocating disk space for files. Various approaches are
See how BSD UNIX allocates files (using indexed allocation).
Different ways of naming files:
A single directory holds all the files in the filesystem. Only a filename is required to unambiguously refer to a file. Disadvantages: with many files, single directory becomes unwieldy; multiple users can see each others' files.
Each user has their own directory. (Used in the CP/M system, which predates MS-DOS.) For example, "user1:textfile.doc" is different from "user2:textfile.doc". Effectively like multiple flat filesystems, one for each user.
The namespace has a tree structure, i.e. allows nested directories.
To unambiguously refer to a file, must use the full path name, e.g. "/home/u6/bob/docs/my_file.tex".
Also, some systems make a distinction between different volumes. Each has its own filesystem.
e.g. "main disk:users/bob/documents/paper one"Others---like UNIX---combine all filesystems into a single directory tree.
e.g. "/home/users/bob/documents/paper_one.tex"UNIX and UNIX-like systems use this idea of a unified namespace. The naming of files is uniform across different disks.