X-Git-Url: http://cloudbase.mooo.com/gitweb/z180-stamp.git/blobdiff_plain/5366852335044c1e68a5c32548d3051cc943552f..5013b94fb43ed4e86efb5d1d72350537cd1a3f8f:/fatfs/doc/ja/readdir.html diff --git a/fatfs/doc/ja/readdir.html b/fatfs/doc/ja/readdir.html index bd1c34e..5305b0a 100644 --- a/fatfs/doc/ja/readdir.html +++ b/fatfs/doc/ja/readdir.html @@ -1,7 +1,7 @@
- + @@ -13,33 +13,32 @@fBNgÚðÇÝoµÜ·B
+ãã£ã¬ã¯ããªé ç®ãèªã¿åºãã¾ãã
FRESULT f_readdir ( - DIR* dp, /* [IN] fBNgEuWFNg\¢ÌÖÌ|C^ */ - FILINFO* fno /* [OUT] t@Cîñ\¢ÌÖÌ|C^ */ + DIR* dp, /* [IN] ãã£ã¬ã¯ã㪠ãã¸ã§ã¯ãæ§é ä½ã¸ã®ãã¤ã³ã¿ */ + FILINFO* fno /* [OUT] ãã¡ã¤ã«æ å ±æ§é ä½ã¸ã®ãã¤ã³ã¿ */ );
FR_OK, FR_DISK_ERR, FR_INT_ERR, -FR_NOT_READY, FR_INVALID_OBJECT, FR_TIMEOUT, FR_NOT_ENOUGH_CORE @@ -48,66 +47,70 @@ FRESULT f_readdir (
fBNgÌÚ(t@CÆfBNg)ðÇÝoµÜ·B±ÌÖðJèÔµÀs·é±ÆÉæè»ÌfBNgÌSÄÌÚðÇÝo·±ÆªÅ«Ü·B¾çêét@CîñÌÚ×É¢ÄÍ FILINFO\¢ÌðQƵľ³¢BSÄÌÚªÇÝo³êAÇÝo·Úªà¤³¢Æ«ÍAfname[]oÉk¶ñªÔ³êÜ·BfnoÉkE|C^ðwè·éÆA»ÌfBNgÌ[hECfbNXðæªÉª«ßµÜ·BܽA±ÌÖÍɦ·æ¤ÉÖA·é\¬IvVÉæè®ìªÏíèÜ·B
-hbgEGg("."A"..")ÍAÎpXªLøÈÆ«(_FS_RPATH >= 1)ÉÌÝoÍÉ»êÜ·B
-LFN@\ªLøÈÍA±ÌÖÌÄÑoµÉæ§ÁÄFILINFO\¢ÌÌlfnameÆlfsizeªLøÈlÅú»³êĢȯêÎÈèܹñBlfnameÍLFNði[·éobt@ÅAlfsizeÍ»Ìobt@ÌvfÅ·BLFNðÇÝo·KvªÈ¢Æ«ÍAlfnameÉkE|C^ðZbgµÄ¾³¢BÌðÉêÂÅàY·éêÍALFNi[obt@Ék¶ñªÔ³êÜ·B
+ãã£ã¬ã¯ããªã®é ç®(ãã¡ã¤ã«ããã³ãµã ãã£ã¬ã¯ããª)ã®æ å ±ãé 次èªã¿åºãã¾ãããã®é¢æ°ãç¹°ãè¿ãå®è¡ãããã¨ã«ãããã®ãã£ã¬ã¯ããªã®å ¨ã¦ã®é ç®ãèªã¿åºããã¨ãã§ãã¾ããå¾ããããã¡ã¤ã«æ å ±ã®è©³ç´°ã«ã¤ãã¦ã¯ FILINFOæ§é ä½ãåç §ãã¦ãã ãããå ¨ã¦ã®é ç®ãèªã¿åºãããèªã¿åºãé ç®ãããç¡ãã¨ãã¯ãfno->fname[]ã«ãã«æååãè¿ããã¾ããfnoã«ãã« ãã¤ã³ã¿ãæå®ããã¨ããã®ãã£ã¬ã¯ããªã®ãªã¼ã ã¤ã³ããã¯ã¹ãå é ã«å·»ãæ»ãã¾ãããµã ãã£ã¬ã¯ããªã®ããã ã¨ã³ããª("."ã¨"..")ã¯ãåºåã«ç¾ãã¾ããã
+LFNæ§æã§ã¯ãaltname[]ãæ°ãã«å®ç¾©ããããã®ãªãã¸ã§ã¯ãã®çããã¡ã¤ã«åãã¹ãã¢ããã¾ãã次ã®æ¡ä»¶ã®ã¨ãã¯é·ããã¡ã¤ã«åãè¿ããªãã®ã§fname[]ã«çããã¡ã¤ã«åãã¹ãã¢ãããaltname[]ã¯ãã«æååã«ãªãã¾ãã
ܽAfBNgÚÉLFNîñª¶ÝµÈ¢êÍAfname[]Ép¬¶ªÜÜêéêª èÜ·B
+exFATããªã¥ã¼ã ã®ãã£ã¬ã¯ããªãèªã¿åºãã¨ããæ§æã«ãã£ã¦ã¯åé¡ãçºçãã¾ããexFATã§ã¯çããã¡ã¤ã«åããµãã¼ãããã¾ãããã¤ã¾ããä¸è¨ã®æ¡ä»¶ã®ã¨ã代ããã«è¿ããã¡ã¤ã«åãç¡ãã¨ãããã¨ã§ãããã®ãããªå ´åã¯fname[]ã«"?"ãè¿ããããã®ãªãã¸ã§ã¯ãã«ã¢ã¯ã»ã¹ã§ããªããã¨ã示ãã¾ãããã®åé¡ãé¿ããã«ã¯ãFatFsã®æ§æã_LFN_UNICODE = 1ããã³_MAX_LFN = 255ã¨ãã¦é·ããã¡ã¤ã«åã«å®å ¨å¯¾å¿ã¨ããå¿ è¦ãããã¾ãã
_FS_MINIMIZE <= 1ÌÆ«ÉgpÂ\Å·B
+_FS_MINIMIZE <= 1ã®ã¨ãã«ä½¿ç¨å¯è½ã§ãã
+FATFS fs; +char buff[256]; + FRESULT scan_files ( - char* path /* Jnm[h ([NGAƵÄàgp) */ + char* path /* éå§ãã¼ã (ã¯ã¼ã¯ã¨ãªã¢ã¨ãã¦ã使ç¨) */ ) { FRESULT res; - FILINFO fno; DIR dir; - int i; - char *fn; /* ñUnicode\¬ðzè */ -#if _USE_LFN - static char lfn[_MAX_LFN + 1]; - fno.lfname = lfn; - fno.lfsize = sizeof lfn; -#endif + UINT i; + static FILINFO fno; - res = f_opendir(&dir, path); /* fBNgðJ */ + res = f_opendir(&dir, path); /* ãã£ã¬ã¯ããªãéã */ if (res == FR_OK) { - i = strlen(path); for (;;) { - res = f_readdir(&dir, &fno); /* fBNgÚð1ÂÇÝo· */ - if (res != FR_OK || fno.fname[0] == 0) break; /* G[ܽÍÚ³µÌƫͲ¯é */ - if (fno.fname[0] == '.') continue; /* hbgGgͳ */ -#if _USE_LFN - fn = *fno.lfname ? fno.lfname : fno.fname; -#else - fn = fno.fname; -#endif - if (fno.fattrib & AM_DIR) { /* fBNg */ - sprintf(&path[i], "/%s", fn); - res = scan_files(path); + res = f_readdir(&dir, &fno); /* ãã£ã¬ã¯ããªé ç®ã1åèªã¿åºã */ + if (res != FR_OK || fno.fname[0] == 0) break; /* ã¨ã©ã¼ã¾ãã¯é ç®ç¡ãã®ã¨ãã¯æãã */ + if (fno.fattrib & AM_DIR) { /* ãã£ã¬ã¯ã㪠*/ + i = strlen(path); + sprintf(&path[i], "/%s", fno.fname); + res = scan_files(path); /* ä¸ã¤ä¸ã¸ */ if (res != FR_OK) break; path[i] = 0; - } else { /* t@C */ - printf("%s/%s\n", path, fn); + } else { /* ãã¡ã¤ã« */ + printf("%s/%s\n", path, fno.fname); } } - f_closedir(&dir); + f_closedir(&dir) + } + + return res; +} + + +int main (void) +{ + FRESULT res; + + + res = f_mount(&fs, "", 1); + if (res == FR_OK) { + strcpy(buff, "/"); + res = scan_files(buff); } return res; @@ -117,10 +120,10 @@ FRESULT scan_files ( - +