From 5630b9308323c3f3aaa09be8fe0f3aecaa826473 Mon Sep 17 00:00:00 2001 From: Leo C. Date: Sun, 30 Jun 2024 09:37:28 +0200 Subject: Import fatfs R0.15 --- fatfs/documents/doc/findfirst.html | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) (limited to 'fatfs/documents/doc/findfirst.html') diff --git a/fatfs/documents/doc/findfirst.html b/fatfs/documents/doc/findfirst.html index daa6de6..5f1e344 100644 --- a/fatfs/documents/doc/findfirst.html +++ b/fatfs/documents/doc/findfirst.html @@ -61,12 +61,19 @@ FRESULT f_findfirst (

Description

-

After the directory specified by path could be opened, it starts to search the directory for items with the name specified by pattern. If the first item is found, the information about the object is stored into the file information structure fno.

-

The matching pattern can contain wildcard characters (? and *). A ? matches an any character and an * matches an any string in length of zero or longer. When support of long file name is enabled, only fname[] is tested at FF_USE_FIND == 1 and also altname[] is tested at FF_USE_FIND == 2. In this revision, there are some differences listed below between FatFs and standard systems in matching condition.

+

After the directory specified by path could be opened, it starts to search the directory for items with the matching pattern specified by pattern. If the first item is found, the information about the item is stored into the file information structure fno. If not found, fno->fname[] has a null string.

+

The matching pattern string can contain wildcards. For example:

+

Since the matching algorithm uses recursion, number of wildcards in the matching pattern is limited to four to limit the stack usage. Any pattern with too many wildcards does not match any name. In LFN configuration, only fname[] is tested when FF_USE_FIND == 1 and also altname[] is tested when FF_USE_FIND == 2. There are some differences listed below between FatFs and standard systems in matching condition.

+
@@ -85,13 +92,13 @@ FRESULT f_findfirst ( void find_image_file (void) { FRESULT fr; /* Return value */ - DIR dj; /* Directory search object */ + DIR dj; /* Directory object */ FILINFO fno; /* File information */ - fr = f_findfirst(&dj, &fno, "", "dsc*.jpg"); /* Start to search for photo files */ + fr = f_findfirst(&dj, &fno, "", "????????.JPG"); /* Start to search for photo files */ while (fr == FR_OK && fno.fname[0]) { /* Repeat while an item is found */ - printf("%s\n", fno.fname); /* Display the object name */ + printf("%s\n", fno.fname); /* Print the object name */ fr = f_findnext(&dj, &fno); /* Search for next item */ } -- cgit v1.2.3