Merge branch 'docs/update_cn_translation_for_storage_fatfs' into 'docs/fatfs_unlink_discrepancy'

docs: Update CN translation for fatfs

See merge request espressif/esp-idf!37155
This commit is contained in:
Zhang Shu Xian 2025-02-26 17:50:42 +08:00
commit 656415b8aa
2 changed files with 7 additions and 6 deletions

View File

@ -43,11 +43,11 @@ Most applications use the following workflow when working with ``esp_vfs_fat_``
The convenience functions :cpp:func:`esp_vfs_fat_sdmmc_mount`, :cpp:func:`esp_vfs_fat_sdspi_mount`, and :cpp:func:`esp_vfs_fat_sdcard_unmount` wrap the steps described above and also handle SD card initialization. These functions are described in the next section. The convenience functions :cpp:func:`esp_vfs_fat_sdmmc_mount`, :cpp:func:`esp_vfs_fat_sdspi_mount`, and :cpp:func:`esp_vfs_fat_sdcard_unmount` wrap the steps described above and also handle SD card initialization. These functions are described in the next section.
Differences to POSIX standard Differences from the POSIX Standard
----------------------------- -----------------------------------
#. :cpp:func:`link`: Because FAT filesystem does not support hardlinks, :cpp:func:`link` copies contents of the file instead. (This only applies to files on FatFs volumes.) #. :cpp:func:`link`: Because FAT filesystem does not support hardlinks, :cpp:func:`link` copies contents of the file instead. (This only applies to files on FatFs volumes.)
#. :cpp:func:`unlink`: When trying to remove an open file, the operation will either fail with ``EBUSY``, when ``CONFIG_FATFS_FS_LOCK`` is enabled, or the behaviour is undefined (possibly causing FS corruption), if not. #. :cpp:func:`unlink`: Attempting to remove an open file will fail with ``EBUSY`` when ``CONFIG_FATFS_FS_LOCK`` is enabled. Otherwise, the behavior is undefined and may cause file system corruption.
.. _using-fatfs-with-vfs-and-sdcards: .. _using-fatfs-with-vfs-and-sdcards:

View File

@ -43,10 +43,11 @@ FatFs 与 VFS 配合使用
便捷函数 :cpp:func:`esp_vfs_fat_sdmmc_mount`:cpp:func:`esp_vfs_fat_sdspi_mount`:cpp:func:`esp_vfs_fat_sdcard_unmount` 对上述步骤进行了封装,并加入了对 SD 卡初始化的处理。我们将在下一章节详细介绍以上函数。 便捷函数 :cpp:func:`esp_vfs_fat_sdmmc_mount`:cpp:func:`esp_vfs_fat_sdspi_mount`:cpp:func:`esp_vfs_fat_sdcard_unmount` 对上述步骤进行了封装,并加入了对 SD 卡初始化的处理。我们将在下一章节详细介绍以上函数。
.. note:: 与 POSIX 标准的差异
---------------------
FAT 文件系统不支持硬链接,因此调用 :cpp:func:`link` 后会复制文件内容(仅适用于 FatFs 卷上的文件)。
#. :cpp:func:`link`:由于 FAT 文件系统不支持硬链接,调用 :cpp:func:`link` 后会复制文件内容(仅适用于 FatFs 卷上的文件)。
#. :cpp:func:`unlink`:当尝试删除已打开的文件时,如果启用了 ``CONFIG_FATFS_FS_LOCK``,操作将失败并返回 ``EBUSY``。如果未启用,则行为未定义(可能导致文件系统损坏)。
.. _using-fatfs-with-vfs-and-sdcards: .. _using-fatfs-with-vfs-and-sdcards: