Low Level
- Handles organization of files on disks/media: data structure to find/allocate disk blocks
- File meta data: permissions, owner, times
Higer Level
E.g., Linux VFS (virtual file system)
- Interface for accessing a file system
- Support multiple file systems. Each one implements the vfs interface.
Window supports multiple file systems: e.g., FAT16, FAT32, NTFS
Linux VFS supports multiple file ext2, ext3, ext4, and the Windows file systems.
Linux Interface in C
Each file system has its own FileObject (below) and must provide the functions that are inserted into its FileObject's array of file_ops.
typedef struct { unsigned short refcount; struct file_ops *file_op; /* function pointers */ } FileObject;
Access at higher level is through an array of function pointers. Higher level uses same interface for all file systems, just a different FileObject instance.