X-Git-Url: http://cloudbase.mooo.com/gitweb/z180-stamp.git/blobdiff_plain/5366852335044c1e68a5c32548d3051cc943552f..5013b94fb43ed4e86efb5d1d72350537cd1a3f8f:/fatfs/doc/ja/open.html diff --git a/fatfs/doc/ja/open.html b/fatfs/doc/ja/open.html index a4c4a18..9fb7642 100644 --- a/fatfs/doc/ja/open.html +++ b/fatfs/doc/ja/open.html @@ -1,7 +1,7 @@
- + @@ -13,33 +13,34 @@t@CðI[vܽÍ쬵ܷB
+ãã¡ã¤ã«ããªã¼ãã³ã¾ãã¯ä½æãã¾ãã
FRESULT f_open ( - FIL* fp, /* [OUT] óÌt@CEIuWFNg\¢ÌÖÌ|C^ */ - const TCHAR* path, /* [IN] t@C¼ÖÌ|C^ */ - BYTE mode /* [IN] [htO */ + FIL* fp, /* [OUT] 空ã®ãã¡ã¤ã« ãªãã¸ã§ã¯ãæ§é ä½ã¸ã®ãã¤ã³ã¿ */ + const TCHAR* path, /* [IN] ãã¡ã¤ã«åã¸ã®ãã¤ã³ã¿ */ + BYTE mode /* [IN] ã¢ã¼ããã©ã° */ );
l | Ó¡ |
---|---|
FA_READ | ÇÝoµ[hÅJ«Ü·BÇÝ«·éêÍFA_WRITEƤÉwèµÜ·B |
FA_WRITE | «Ý[hÅJ«Ü·BÇÝ«·éêÍFA_READƤÉwèµÜ·B |
FA_OPEN_EXISTING | ù¶Ìt@CðJ«Ü·Bt@Cª³¢Æ«ÍG[ÉÈèÜ·B(ftHg) |
FA_OPEN_ALWAYS | ù¶Ìt@CðJ«Ü·Bt@Cª³¢Æ«Ít@Cð쬵ܷBÇLÌêÍA±Ìû@ÅI[vµ½ãAf_lseek()Åt@CÌÅãöÉÚ®µÄ¾³¢B |
FA_CREATE_NEW | t@Cð쬵ܷB¯¼Ìt@Cª éêÍAFR_EXISTŸsµÜ·B |
FA_CREATE_ALWAYS | t@Cð쬵ܷB¯¼Ìt@Cª éêÍATCYð0ɵĩçJ«Ü·B |
å¤ | æå³ |
FA_READ | èªã¿åºãã¢ã¼ãã§éãã¾ããèªã¿æ¸ãããå ´åã¯FA_WRITEã¨å ±ã«æå®ãã¾ãã |
FA_WRITE | æ¸ãè¾¼ã¿ã¢ã¼ãã§éãã¾ããèªã¿æ¸ãããå ´åã¯FA_READã¨å ±ã«æå®ãã¾ãã |
FA_OPEN_EXISTING | æ¢åã®ãã¡ã¤ã«ãéãã¾ãããã¡ã¤ã«ãç¡ãã¨ãã¯ã¨ã©ã¼ã«ãªãã¾ãã(ããã©ã«ã) |
FA_CREATE_NEW | ãã¡ã¤ã«ãä½æãã¾ããååã®ãã¡ã¤ã«ãããå ´åã¯ãFR_EXISTã§å¤±æãã¾ãã |
FA_CREATE_ALWAYS | ãã¡ã¤ã«ãä½æãã¾ããååã®ãã¡ã¤ã«ãããå ´åã¯ããµã¤ãºã0ã«ãã¦ããéãã¾ãã |
FA_OPEN_ALWAYS | æ¢åã®ãã¡ã¤ã«ãéãã¾ãããã¡ã¤ã«ãç¡ãã¨ãã¯ãã¡ã¤ã«ãä½æãã¾ãã |
FA_OPEN_APPEND | FA_OPEN_ALWAYSã¨åãã§ããããªã¼ã/ã©ã¤ã ãã¤ã³ã¿ã¯ãã¡ã¤ã«ã®æå¾å°¾ã«ã»ããããã¾ãã |
FR_OK, FR_DISK_ERR, @@ -72,86 +73,86 @@ FRESULT f_open (
ù¶Ìt@CðJ¢½èAVµ¢t@Cð쬵ܷBÖª¬÷·éÆt@CEIuWFNgªì¬³êAÈ~»Ìt@CÉηéANZXÉgpµÜ·Bt@Cð¶éÆ«ÍAf_close()ðgpµÜ·B½ç©ÌÏXªsíê½t@Cª»Ì㳵¶çêÈ©Á½êA»Ìt@Cªj¹·éêª èÜ·B
-ùÉJ©êÄ¢ét@CðJKvª éêÍA½dANZX§äðQƵľ³¢Bµ©µAêÂÌt@CÉηé«Ý[hðÜÞd¡I[vÍíÉÖ~Å·B
-t@CEANZXðJn·éOÉAf_mount()ðgÁÄ»ê¼êÌ_hCuÉ[NEGA(t@CEVXeEIuWFNg)ð^¦éKvª èÜ·B±Ìú»ÌãA»Ì_hCuÉεÄSÄÌt@CÖªg¦éæ¤ÉÈèÜ·B
+æ¢åã®ãã¡ã¤ã«ãéããããæ°ãããã¡ã¤ã«ãä½æãã¾ããé¢æ°ãæåããã¨ãã¡ã¤ã« ãªãã¸ã§ã¯ããä½æããã以éãã®ãã¡ã¤ã«ã«å¯¾ããã¢ã¯ã»ã¹ã«ä½¿ç¨ãã¾ãããã¡ã¤ã«ãéããã¨ãã¯ãf_closeé¢æ°ã使ç¨ãã¾ããä½ããã®å¤æ´ãè¡ããããã¡ã¤ã«ããã®å¾æ£ããéããããªãã£ãå ´åããã®ãã¡ã¤ã«ãç ´æããå ´åãããã¾ãã
+æ¢ã«éããã¦ãããã¡ã¤ã«ãéãå¿ è¦ãããå ´åã¯ãå¤éã¢ã¯ã»ã¹å¶å¾¡ãåç §ãã¦ãã ãããããããä¸ã¤ã®ãã¡ã¤ã«ã«å¯¾ããæ¸ãè¾¼ã¿ã¢ã¼ããå«ãéè¤ãªã¼ãã³ã¯å¸¸ã«ç¦æ¢ã§ãã
+ãã¡ã¤ã« ã¢ã¯ã»ã¹ãéå§ããåã«ãf_mounté¢æ°ã使ã£ã¦ããããã®è«çãã©ã¤ãã«ã¯ã¼ã¯ ã¨ãªã¢(ãã¡ã¤ã« ã·ã¹ãã ãªãã¸ã§ã¯ã)ãä¸ããå¿ è¦ãããã¾ãããã®åæåã®å¾ããã®è«çãã©ã¤ãã«å¯¾ãã¦å ¨ã¦ã®ãã¡ã¤ã«é¢æ°ã使ããããã«ãªãã¾ããf_mkfsé¢æ°ã¨f_fdské¢æ°ã¯ãã¯ã¼ã¯ã¨ãªã¢ç¡ãã§ã使ãã¾ãã
SÄÌ\¬ÅgpÂ\Å·B_FS_READONLY == 1ÌÆ«ÍAFA_WRITE, FA_CREATE_ALWAYS, FA_CREATE_NEW, FA_OPEN_ALWAYSÌetOÍT|[g³êܹñB
+å ¨ã¦ã®æ§æã§ä½¿ç¨å¯è½ã§ãã_FS_READONLY == 1ã®ã¨ãã¯ãFA_READã¨FA_OPEN_EXISTING以å¤ã®åãã©ã°ã¯ãµãã¼ãããã¾ããã
-/* eLXgt@CðÇÝoµÄ\¦ */ +/* ããã¹ããã¡ã¤ã«ãèªã¿åºãã¦è¡¨ç¤º */ -FATFS FatFs; /* _hCuÌ[NEGA(t@CEVXeEIuWFNg) */ +FATFS FatFs; /* è«çãã©ã¤ãã®ã¯ã¼ã¯ ã¨ãªã¢(ãã¡ã¤ã« ã·ã¹ãã ãªãã¸ã§ã¯ã) */ int main (void) { - FIL fil; /* t@CEIuWFNg */ - char line[82]; /* sobt@ */ - FRESULT fr; /* ßèl */ + FIL fil; /* ãã¡ã¤ã« ãªãã¸ã§ã¯ã */ + char line[82]; /* è¡ãããã¡ */ + FRESULT fr; /* æ»ãå¤ */ - /* ftHgEhCuÉ[NGAð^¦é */ + /* ããã©ã«ã ãã©ã¤ãã«ã¯ã¼ã¯ã¨ãªã¢ãä¸ãã */ f_mount(&FatFs, "", 0); - /* eLXgEt@CðJ */ + /* ããã¹ã ãã¡ã¤ã«ãéã */ fr = f_open(&fil, "message.txt", FA_READ); if (fr) return (int)fr; - /* 1s¸ÂÇÝoµÄ\¦ */ + /* 1è¡ãã¤èªã¿åºãã¦è¡¨ç¤º */ while (f_gets(line, sizeof line, &fil)) printf(line); - /* t@Cð¶é */ + /* ãã¡ã¤ã«ãéãã */ f_close(&fil); return 0; }
-/* hCu1Ìt@C "file.bin" ðhCu0ÖRs[ */ +/* ãã©ã¤ã1ã®ãã¡ã¤ã« "file.bin" ããã©ã¤ã0ã¸ã³ãã¼ */ int main (void) { - FATFS fs[2]; /* _hCuÌ[NGA(t@CEVXeEIuWFNg) */ - FIL fsrc, fdst; /* t@CEIuWFNg */ + FATFS fs[2]; /* è«çãã©ã¤ãã®ã¯ã¼ã¯ã¨ãªã¢(ãã¡ã¤ã« ã·ã¹ãã ãªãã¸ã§ã¯ã) */ + FIL fsrc, fdst; /* ãã¡ã¤ã« ãªãã¸ã§ã¯ã */ BYTE buffer[4096]; /* File copy buffer */ FRESULT fr; /* FatFs function common result code */ UINT br, bw; /* File R/W count */ - /* hCu0,1É[NEGAð^¦é */ + /* ãã©ã¤ã0,1ã«ã¯ã¼ã¯ ã¨ãªã¢ãä¸ãã */ f_mount(&fs[0], "0:", 0); f_mount(&fs[1], "1:", 0); - /* hCu1ÌRs[³t@CðJ */ + /* ãã©ã¤ã1ã®ã³ãã¼å ãã¡ã¤ã«ãéã */ res = f_open(&fsrc, "1:file.dat", FA_OPEN_EXISTING | FA_READ); if (fr) return (int)fr; - /* hCu0ÉRs[æt@Cð쬷é */ + /* ãã©ã¤ã0ã«ã³ãã¼å ãã¡ã¤ã«ãä½æãã */ res = f_open(&fdst, "0:file.dat", FA_CREATE_ALWAYS | FA_WRITE); if (fr) return (int)fr; - /* Rs[³©çRs[æÉf[^]·é */ + /* ã³ãã¼å ããã³ãã¼å ã«ãã¼ã¿è»¢éãã */ for (;;) { - res = f_read(&fsrc, buffer, sizeof buffer, &br); /* Rs[³©ç©çÇÝo· */ - if (res || br == 0) break; /* G[©t@CI[ */ - res = f_write(&fdst, buffer, br, &bw); /* »êðRs[æÉ«Þ */ - if (res || bw < br) break; /* G[©fBXNt */ + res = f_read(&fsrc, buffer, sizeof buffer, &br); /* ã³ãã¼å ããããèªã¿åºã */ + if (res || br == 0) break; /* ã¨ã©ã¼ããã¡ã¤ã«çµç«¯ */ + res = f_write(&fdst, buffer, br, &bw); /* ãããã³ãã¼å ã«æ¸ãè¾¼ã */ + if (res || bw < br) break; /* ã¨ã©ã¼ããã£ã¹ã¯æºæ¯ */ } - /* SÄÌt@Cð¶é */ + /* å ¨ã¦ã®ãã¡ã¤ã«ãéãã */ f_close(&fsrc); f_close(&fdst); - /* [NEGAðJú·é */ + /* ã¯ã¼ã¯ ã¨ãªã¢ãéæ¾ãã */ f_mount(NULL, "0:", 0); f_mount(NULL, "1:", 0); @@ -162,10 +163,10 @@ int main (void) - +