The role of a file system is to organise the storage of files on both volatile and non-volatile storage, to organise the hierarchy of folders, ensure security is implemented correctly, and define correct filename conventions.
Space management
Files are not necessarily stored as single blocks of data, they can be split over multiple areas of a HDD or SSD. The file system ensures the files are able to be written and read without loss of data.
Filenames
File systems define the correct nomenclature (naming) of files, this includes allowed characters, length, and file extensions (such as .docx or .txt).
Directories
Files are stored in a hierarchy with the root directory being the very top of the tree. File systems specify and maintain the index of these directories.