File system, such as fat32, etc.

File system is the concept of pure software.

 

Data stored in the storage medium, can be stored directly, but the storage find, edit, add or delete other operations are troublesome.

To solve the above problem, each individual is defined as a set of data files, if the data in each file stored directly occurs using the above-mentioned problems.

Now in addition to the original data file, add some additional information, such as file location, file size, file name, file type and the like. These original data and associated additional information together to form a document. Thus, when looking for or modify files, you can easily operate.

 

What extra information, use this information to how convenient file data needed to operate, these are defined in the file system.

These are pure software implementation, with the general structure, which contains the file path, size, name and other member information.

Of course, not simply a specific structure, a file system to implement than the method using a structure is much more complicated, can refer to the FreeRTOS Fat source. But the principle is the same, easy to understand by the concept of a structure.

 

Using the file system, the data stored on the storage medium to change. A data file is no longer just raw data, and that includes file information and raw data the data of the two parts. Therefore, the file system will consume more storage space. But when dealing with data files on a lot of convenience.

 

Based on the file system, operating system, you can easily find, modify the data file. Because the file system information, the file information can easily locate the file, the file to be modified in any location.

Windows FAT file system is based on the sentence that is stored in the windows system files are in the original data base, add the file information FAT file system defined. When we open Explorer browser, it can clearly show the specific information for each file and convenient to operate on each file (open, close, create, delete, copy, paste, etc.).

 

For embedded systems, such as the MCU system, the file system is driven above the underlying memory interface, adds a layer.

To the original data stored in the memory (e.g., SD card, flash, etc.) to add the file information. File information of each file is the same, so that this information can be made into a class (file system layer), each file on the file information and then add the stored in the memory.

After these files when the data is operated by the file pointer information, it can be conveniently operated.

 

Reference website:

Why use the file system:

http://www.360doc.com/content/18/1117/00/99071_795394734.shtml

https://blog.csdn.net/u013709443/article/details/79369124

 

Published 264 original articles · won praise 520 · Views 3 million +

Guess you like

Origin blog.csdn.net/phenixyf/article/details/99660336