File system

A file system is the method and data structure that an operating system uses to control how data is stored, organized, and retrieved on non-volatile storage media, such as hard drives and SSDs. Essentially, it manages the physical space allocated to files and directories, tracking metadata that includes file names, sizes, timestamps, and physical locations on the disk. Different file systems employ various mechanisms for achieving data integrity, such as journaling, which records changes before they are committed to prevent corruption in the event of a system crash. The design of a file system dictates how efficiently the device can manage pointers and maintain a consistent directory structure for both the operating system kernel and user applications.