X-Git-Url: http://cloudbase.mooo.com/gitweb/z180-stamp.git/blobdiff_plain/289f6a146c0b2087607d8d8659531ea90142779a..7aaec0f97677b451e024ef5d1cd2b675a914d440:/fatfs/documents/doc/readdir.html diff --git a/fatfs/documents/doc/readdir.html b/fatfs/documents/doc/readdir.html index 878cb02..52a96b9 100644 --- a/fatfs/documents/doc/readdir.html +++ b/fatfs/documents/doc/readdir.html @@ -20,6 +20,11 @@ FRESULT f_readdir ( FILINFO* fno /* [OUT] File information structure */ ); +
+FRESULT f_rewinddir (
+  DIR* dp       /* [IN] Directory object */
+);
+
@@ -48,15 +53,19 @@ FRESULT f_readdir (

Description

-

The f_readdir function reads a directory item, informations about the object. All items in the directory can be read in sequence by f_readdir function calls. Dot entries ("." and "..") in the sub-directory are filtered out and they will never appear in the read items. When all directory items have been read and no item to read, a nul string is stored into the fno->fname[] without any error. When a null pointer is given to the fno, the read index of the directory object is rewinded.

-

When support of long file name (LFN) is enabled, a member altname[] is defined in the file information structure to store the short file name of the object. If the long file name is not accessible due to some reason listed below, short file name is stored to the fname[] and altname[] has a null string.

+

The f_readdir function reads a directory item, informations about the object, from the open directory. Items in the directory can be read in sequence by f_readdir function calls. When all items in the directory have been read and no item to read, a null string is stored into the fno->fname[] without any error. When a null pointer is given to the fno, the read index of the directory object is rewinded. The f_rewinddir function is implemented as a macro.

+
+#define f_rewinddir(dp) f_readdir((dp), 0)
+
+

When LFN is enabled, a member altname[] is defined in the file information structure to store the short file name of the object. If the long file name is not accessible due to a reason listed below, short file name is stored to the fname[] and the altname[] has a null string.

-

There is a problem on reading a directory of exFAT volume. The exFAT does not support short file name. This means no name can be returned on the condition above. If it is the case, "?" is returned into the fname[] to indicate that the object is not accessible. To avoid this problem, configure FatFs FF_LFN_UNICODE >= 1 and FF_MAX_LFN == 255 to support the full feature of LFN specification.

+

There is an issue on read directories in exFAT volume. The exFAT does not support short file name. This means no name can be returned on the condition above. If it is the case, "?" is returned as the file name to indicate that the object is not accessible. To avoid this problem, configure FatFs FF_LFN_UNICODE != 0 and FF_MAX_LFN == 255 to support the full feature of LFN specification.

+

Dot entries ("." and "..") in the sub-directory of FAT volume are filtered out and they will never appear in the read items because exFAT lacks dot entries in the sub-directory.

@@ -94,7 +103,7 @@ FRESULT scan_files ( printf("%s/%s\n", path, fno.fname); } } - f_closedir(&dir) + f_closedir(&dir); } return res;