mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-07 20:00:53 +00:00
docs: Update CN translation for fatfs
This commit is contained in:
@@ -20,7 +20,9 @@ The function :cpp:func:`esp_vfs_fat_unregister_path` deletes the registration wi
|
||||
|
||||
Most applications use the following workflow when working with ``esp_vfs_fat_`` functions:
|
||||
|
||||
#. Call :cpp:func:`esp_vfs_fat_register` to specify:
|
||||
#.
|
||||
Call :cpp:func:`esp_vfs_fat_register` to specify:
|
||||
|
||||
- Path prefix where to mount the filesystem (e.g., ``"/sdcard"``, ``"/spiflash"``)
|
||||
- FatFs drive number
|
||||
- A variable which receives the pointer to the ``FATFS`` structure
|
||||
@@ -72,15 +74,14 @@ The following configuration options are available for the FatFs component:
|
||||
* :ref:`CONFIG_FATFS_IMMEDIATE_FSYNC` - If enabled, the FatFs will automatically call :cpp:func:`f_sync` to flush recent file changes after each call of :cpp:func:`write`, :cpp:func:`pwrite`, :cpp:func:`link`, :cpp:func:`truncate` and :cpp:func:`ftruncate` functions. This feature improves file-consistency and size reporting accuracy for the FatFs, at a price of decreased performance due to frequent disk operations.
|
||||
* :ref:`CONFIG_FATFS_LINK_LOCK` - If enabled, this option guarantees the API thread safety, while disabling this option might be necessary for applications that require fast frequent small file operations (e.g., logging to a file). Note that if this option is disabled, the copying performed by :cpp:func:`link` will be non-atomic. In such case, using :cpp:func:`link` on a large file on the same volume in a different task is not guaranteed to be thread safe.
|
||||
|
||||
|
||||
These options set a behavior of how the FATFS filesystem calculates and reports free space:
|
||||
These options set a behavior of how the FatFs filesystem calculates and reports free space:
|
||||
|
||||
* :ref:`CONFIG_FATFS_DONT_TRUST_FREE_CLUSTER_CNT` - If 1, free cluster count will be ignored. Default value is 0.
|
||||
* :ref:`CONFIG_FATFS_DONT_TRUST_LAST_ALLOC` - If 1, last allocation number will be ignored. Default value is 0.
|
||||
|
||||
.. note::
|
||||
|
||||
Setting these settings to 1 may increase the accuracy of :cpp:func:`f_getfree` output at a price of decreased performance, e.g. due to performing full FAT scan.
|
||||
Setting these options to 1 may increase the accuracy of :cpp:func:`f_getfree` output at a price of decreased performance, e.g., due to performing full FAT scan.
|
||||
|
||||
|
||||
.. _fatfs-diskio-layer:
|
||||
|
Reference in New Issue
Block a user