**A file system** is a method and [[Data structure|data structure]] used by an [[Operating system|operating system]] to control how [[Data|data]] is stored, organized, and retrieved on a [[Storage device|storage device]] such as a [[Hard disk drive|hard disk]], [[Solid-state drive|solid-state drive]], [[Optical disc|optical disc]], or [[Flash memory|flash memory]] device. File systems define the conventions by which files are named, arranged into [[Directory (computing)|directories]], and accessed, and manage the allocation of storage space to ensure data integrity and efficient retrieval. The term refers both to the abstract mechanisms governing data organization and to specific implementations such as [[NTFS]], [[ext4]], [[FAT32]], and [[Apple File System|APFS]]. File systems typically organize storage into a hierarchical structure of directories and files, maintaining [[Metadata|metadata]] about each file including its name, size, creation and modification timestamps, [[File permission|permissions]], and physical location on the storage medium. The physical allocation of space is managed through structures such as [[Inode|inodes]], [[File Allocation Table|file allocation tables]], or [[B-tree|B-trees]], which map logical file addresses to physical storage locations. File systems also implement mechanisms for [[Journaling file system|journaling]] or [[Log-structured file system|logging]] to protect against data corruption in the event of unexpected power loss or system failure, ensuring that the file system can be restored to a consistent state on recovery. Different file system designs reflect trade-offs between performance, reliability, scalability, and feature support. [[Unix filesystem|Unix-derived]] file systems such as [[ext4]] and [[XFS]] are dominant on [[Linux]] systems, while [[NTFS]] is the standard on [[Microsoft Windows|Windows]] platforms and [[Apple File System|APFS]] is used on [[MacOS|macOS]] and [[iOS]] devices. [[FAT32]] and its successor [[ExFAT]] remain widely used for removable media due to broad cross-platform compatibility. [[Distributed file system|Distributed file systems]] such as [[Network File System|NFS]], [[Hadoop Distributed File System|HDFS]], and [[Google File System|GFS]] extend file system abstractions across networked environments, enabling data to be stored and accessed across multiple machines. [[Virtual file system|Virtual file systems]] provide a unified interface that allows applications to interact with multiple underlying file system types through a common [[Application programming interface|API]].