1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-01-23 08:52:10 +01:00

145 lines
5.6 KiB
HTML
Raw Normal View History

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="ja">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Shift_JIS">
<meta http-equiv="Content-Style-Type" content="text/css">
<link rel="up" title="FatFs" href="../00index_j.html">
<link rel="stylesheet" href="../css_j.css" type="text/css" media="screen" title="ELM Default">
<title>FatFs - f_open</title>
</head>
<body>
<div class="para">
<h2>f_open</h2>
<p><EFBFBD>t<EFBFBD>@<40>C<EFBFBD><43><EFBFBD><EFBFBD><EFBFBD>I<EFBFBD>[<5B>v<EFBFBD><76><EFBFBD>܂<EFBFBD><DC82>͍쐬<CD8D><EC90AC><EFBFBD>܂<EFBFBD><DC82>B</p>
<pre>
FRESULT f_open (
FIL* <em>FileObject</em>, /* <20><><EFBFBD>̃t<CC83>@<40>C<EFBFBD><43><EFBFBD>E<EFBFBD>I<EFBFBD>u<EFBFBD>W<EFBFBD>F<EFBFBD>N<EFBFBD>g<EFBFBD>\<5C><><EFBFBD>̂ւ̃|<7C>C<EFBFBD><43><EFBFBD>^ */
const XCHAR* <em>FileName</em>, /* <20>t<EFBFBD>@<40>C<EFBFBD><43><EFBFBD>̃t<CC83><74><EFBFBD>p<EFBFBD>X<EFBFBD><58><EFBFBD>ւ̃|<7C>C<EFBFBD><43><EFBFBD>^ */
BYTE <em>ModeFlags</em> /* <20><><EFBFBD>[<5B>h<EFBFBD>t<EFBFBD><74><EFBFBD>O */
);
</pre>
</div>
<div class="para">
<h4><EFBFBD><EFBFBD><EFBFBD><EFBFBD></h4>
<dl class="par">
<dt>FileObject</dt>
<dd><EFBFBD>V<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>t<EFBFBD>@<40>C<EFBFBD><43><EFBFBD>E<EFBFBD>I<EFBFBD>u<EFBFBD>W<EFBFBD>F<EFBFBD>N<EFBFBD>g<EFBFBD>\<5C><><EFBFBD>̂ւ̃|<7C>C<EFBFBD><43><EFBFBD>^<5E><><EFBFBD>w<EFBFBD><EFBFBD>܂<EFBFBD><DC82>B<EFBFBD>ȍ~<7E>A<EFBFBD><41><EFBFBD>̃t<CC83>@<40>C<EFBFBD><43><EFBFBD><EFBFBD><EFBFBD>‚<EFBFBD><C282><EFBFBD><EFBFBD>܂ł<DC82><C582>̃t<CC83>@<40>C<EFBFBD><43><EFBFBD>E<EFBFBD>I<EFBFBD>u<EFBFBD>W<EFBFBD>F<EFBFBD>N<EFBFBD>g<EFBFBD><67><EFBFBD>g<EFBFBD>p<EFBFBD><70><EFBFBD>ăt<C483>@<40>C<EFBFBD><43><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>܂<EFBFBD><DC82>B</dd>
<dt>FileName</dt>
<dd><EFBFBD>J<EFBFBD><EFBFBD>(<28>܂<EFBFBD><DC82>͍쐬<CD8D><EC90AC><EFBFBD><EFBFBD>)<29>t<EFBFBD>@<40>C<EFBFBD><43><EFBFBD><EFBFBD> <a href="filename.html"><EFBFBD>t<EFBFBD>@<40>C<EFBFBD><43><EFBFBD><EFBFBD></a><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><tt>'\0'</tt><EFBFBD>ŏI<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ւ̃|<7C>C<EFBFBD><43><EFBFBD>^<5E><><EFBFBD>w<EFBFBD><EFBFBD>܂<EFBFBD><DC82>B</dd>
<dt>ModeFlags</dt>
<dd><EFBFBD>t<EFBFBD>@<40>C<EFBFBD><43><EFBFBD>̃A<CC83>N<EFBFBD>Z<EFBFBD>X<EFBFBD><58><EFBFBD>@<40><><EFBFBD>I<EFBFBD>[<5B>v<EFBFBD><76><EFBFBD><EFBFBD><EFBFBD>@<40><><EFBFBD><EFBFBD><EFBFBD>߂<EFBFBD><DF82>t<EFBFBD><74><EFBFBD>O<EFBFBD>ł<EFBFBD><C582>B<EFBFBD><42><EFBFBD>̃p<CC83><70><EFBFBD><EFBFBD><EFBFBD>[<5B>^<5E>ɂ͎<C982><CD8E>̑g<CC91>ݍ<EFBFBD><DD8D><EFBFBD><ED82B9><EFBFBD>w<EFBFBD><EFBFBD>܂<EFBFBD><DC82>B<br>
<table class="lst">
<tr><th><EFBFBD>l</th><th><EFBFBD>Ӗ<EFBFBD></th></tr>
<tr><td>FA_READ</td><td><EFBFBD>ǂݏo<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>[<5B>h<EFBFBD>ŊJ<C58A><4A><EFBFBD>܂<EFBFBD><DC82>B<EFBFBD>ǂݏ<C782><DD8F><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EA8D87><tt>FA_WRITE</tt><EFBFBD>Ƌ<EFBFBD><EFBFBD>Ɏw<EFBFBD><EFBFBD>܂<EFBFBD><EFBFBD>B</td></tr>
<tr><td>FA_WRITE</td><td><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>݃<EFBFBD><EFBFBD>[<5B>h<EFBFBD>ŊJ<C58A><4A><EFBFBD>܂<EFBFBD><DC82>B<EFBFBD>ǂݏ<C782><DD8F><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EA8D87><tt>FA_READ</tt><EFBFBD>Ƌ<EFBFBD><EFBFBD>Ɏw<EFBFBD><EFBFBD>܂<EFBFBD><EFBFBD>B</td></tr>
<tr><td>FA_OPEN_EXISTING</td><td><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>̃t<EFBFBD>@<40>C<EFBFBD><43><EFBFBD><EFBFBD><EFBFBD>J<EFBFBD><4A><EFBFBD>܂<EFBFBD><DC82>B<EFBFBD>t<EFBFBD>@<40>C<EFBFBD><43><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƃ<EFBFBD><C682>̓G<CD83><47><EFBFBD>[<5B>ɂȂ<C982><C882>܂<EFBFBD><DC82>B(<28>f<EFBFBD>t<EFBFBD>H<EFBFBD><48><EFBFBD>g)</td></tr>
<tr><td>FA_OPEN_ALWAYS</td><td><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>̃t<EFBFBD>@<40>C<EFBFBD><43><EFBFBD><EFBFBD><EFBFBD>J<EFBFBD><4A><EFBFBD>܂<EFBFBD><DC82>B<EFBFBD>t<EFBFBD>@<40>C<EFBFBD><43><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƃ<EFBFBD><C682>̓t<CD83>@<40>C<EFBFBD><43><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EC90AC><EFBFBD>܂<EFBFBD><DC82>B</td></tr>
<tr><td>FA_CREATE_NEW</td><td><EFBFBD>t<EFBFBD>@<40>C<EFBFBD><43><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EC90AC><EFBFBD>܂<EFBFBD><DC82>B<EFBFBD><42><EFBFBD><EFBFBD><EFBFBD>̃t<CC83>@<40>C<EFBFBD><43><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>́A<CD81>G<EFBFBD><47><EFBFBD>[<5B>ɂȂ<C982><C882>܂<EFBFBD><DC82>B</td></tr>
<tr><td>FA_CREATE_ALWAYS</td><td><EFBFBD>t<EFBFBD>@<40>C<EFBFBD><43><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EC90AC><EFBFBD>܂<EFBFBD><DC82>B<EFBFBD><42><EFBFBD><EFBFBD><EFBFBD>̃t<CC83>@<40>C<EFBFBD><43><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>́A<CD81>T<EFBFBD>C<EFBFBD>Y<EFBFBD><59>0<EFBFBD>ɂ<EFBFBD><C982>Ă<EFBFBD><C482><EFBFBD><EFBFBD>J<EFBFBD><4A><EFBFBD>܂<EFBFBD><DC82>B</td></tr>
</table>
</dd>
</dl>
</div>
<div class="para">
<h4><EFBFBD>߂<EFBFBD><EFBFBD>l</h4>
<dl class="ret">
<dt>FR_OK (0)</dt>
<dd><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>I<EFBFBD><EFBFBD><EFBFBD>B<EFBFBD>ȍ~<7E>A<tt>FileObject</tt><EFBFBD>\<5C><><EFBFBD>̂<EFBFBD><CC82>g<EFBFBD><67><EFBFBD>Ă<EFBFBD><C482>̃t<CC83>@<40>C<EFBFBD><43><EFBFBD>𑀍<EFBFBD><F091808D>ł<EFBFBD><C582>܂<EFBFBD><DC82>B</dd>
<dt>FR_NO_FILE</dt>
<dd><EFBFBD>t<EFBFBD>@<40>C<EFBFBD><43><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>‚<EFBFBD><C282><EFBFBD><EFBFBD>Ȃ<EFBFBD><C882>B</dd>
<dt>FR_NO_PATH</dt>
<dd><EFBFBD>p<EFBFBD>X<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>‚<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȃ<EFBFBD><EFBFBD>B</dd>
<dt>FR_INVALID_NAME</dt>
<dd><EFBFBD>t<EFBFBD>@<40>C<EFBFBD><43><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>s<EFBFBD><73><EFBFBD>B</dd>
<dt>FR_INVALID_DRIVE</dt>
<dd><EFBFBD>h<EFBFBD><EFBFBD><EFBFBD>C<EFBFBD>u<EFBFBD>ԍ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>s<EFBFBD><EFBFBD><EFBFBD>B</dd>
<dt>FR_EXIST</dt>
<dd><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>̃t<EFBFBD>@<40>C<EFBFBD><43><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɂ<EFBFBD><C982><EFBFBD><EFBFBD>B</dd>
<dt>FR_DENIED</dt>
<dd><EFBFBD>A<EFBFBD>N<EFBFBD>Z<EFBFBD>X<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ۂ<EFBFBD><EFBFBD><EFBFBD>B<EFBFBD><EFBFBD><EFBFBD>[<5B>h<EFBFBD>E<EFBFBD>I<EFBFBD><49><EFBFBD><EFBFBD><EFBFBD>[<5B>E<EFBFBD>t<EFBFBD>@<40>C<EFBFBD><43><EFBFBD>̏<EFBFBD><CC8F><EFBFBD><EFBFBD><EFBFBD><EFBFBD>݃<EFBFBD><DD83>[<5B>h<EFBFBD>E<EFBFBD>I<EFBFBD>[<5B>v<EFBFBD><76><EFBFBD>A<EFBFBD><41><EFBFBD><EFBFBD><EFBFBD>̃f<CC83>B<EFBFBD><42><EFBFBD>N<EFBFBD>g<EFBFBD><67><EFBFBD>܂<EFBFBD><DC82>̓<EFBFBD><CD83>[<5B>h<EFBFBD>E<EFBFBD>I<EFBFBD><49><EFBFBD><EFBFBD><EFBFBD>[<5B>E<EFBFBD>t<EFBFBD>@<40>C<EFBFBD><43><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ԃł̃t<CC83>@<40>C<EFBFBD><43><EFBFBD><EFBFBD>A<EFBFBD>f<EFBFBD>B<EFBFBD>X<EFBFBD>N<EFBFBD>܂<EFBFBD><DC82>̓f<CD83>B<EFBFBD><42><EFBFBD>N<EFBFBD>g<EFBFBD><67><EFBFBD>E<EFBFBD>e<EFBFBD>[<5B>u<EFBFBD><75><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>t<EFBFBD>Ńt<C583>@<40>C<EFBFBD><43><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ł<EFBFBD><C582>Ȃ<EFBFBD><C882>ȂǁB</dd>
<dt>FR_NOT_READY</dt>
<dd><EFBFBD><EFBFBD><EFBFBD>f<EFBFBD>B<EFBFBD>A<EFBFBD><EFBFBD><EFBFBD>Z<EFBFBD>b<EFBFBD>g<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ă<EFBFBD><EFBFBD>Ȃ<EFBFBD><EFBFBD>ȂǁA<EFBFBD>f<EFBFBD>B<EFBFBD>X<EFBFBD>N<EFBFBD>E<EFBFBD>h<EFBFBD><EFBFBD><EFBFBD>C<EFBFBD>u<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>s<EFBFBD>\<5C><><EFBFBD>ԁB</dd>
<dt>FR_WRITE_PROTECTED</dt>
<dd><EFBFBD><EFBFBD><EFBFBD>f<EFBFBD>B<EFBFBD>A<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>݋֎~<7E><><EFBFBD>Ԃŏ<D482><C58F><EFBFBD><EFBFBD><EFBFBD><EFBFBD>݌n<DD8C>I<EFBFBD>[<5B>v<EFBFBD><76><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>B</dd>
<dt>FR_DISK_ERR</dt>
<dd><EFBFBD>f<EFBFBD>B<EFBFBD>X<EFBFBD>N<EFBFBD>E<EFBFBD>G<EFBFBD><EFBFBD><EFBFBD>[<5B>ɂ<EFBFBD><C982><EFBFBD>s<EFBFBD>B</dd>
<dt>FR_INT_ERR</dt>
<dd><EFBFBD>s<EFBFBD><EFBFBD><EFBFBD><EFBFBD>FAT<EFBFBD>\<5C><><EFBFBD>܂<EFBFBD><DC82>͓<EFBFBD><CD93><EFBFBD><EFBFBD>G<EFBFBD><47><EFBFBD>[<5B>ɂ<EFBFBD><C982><EFBFBD>s<EFBFBD>B</dd>
<dt>FR_NOT_ENABLED</dt>
<dd><EFBFBD><EFBFBD><EFBFBD>̘_<EFBFBD><EFBFBD><EFBFBD>h<EFBFBD><EFBFBD><EFBFBD>C<EFBFBD>u<EFBFBD>Ƀ<EFBFBD><EFBFBD>[<5B>N<EFBFBD>E<EFBFBD>G<EFBFBD><47><EFBFBD>A<EFBFBD><41><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ă<EFBFBD><C482><EFBFBD><EFBFBD>Ă<EFBFBD><C482>Ȃ<EFBFBD><C882>B</dd>
<dt>FR_NO_FILESYSTEM</dt>
<dd><EFBFBD>f<EFBFBD>B<EFBFBD>X<EFBFBD>N<EFBFBD><EFBFBD><EFBFBD>ɗL<EFBFBD><EFBFBD><EFBFBD><EFBFBD>FAT<EFBFBD>{<7B><><EFBFBD><EFBFBD><EFBFBD>[<5B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>‚<EFBFBD><C282><EFBFBD><EFBFBD>Ȃ<EFBFBD><C882>B</dd>
</dl>
</div>
<div class="para">
<h4><EFBFBD><EFBFBD><EFBFBD><EFBFBD></h4>
<p><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>t<EFBFBD>@<40>C<EFBFBD><43><EFBFBD>E<EFBFBD>I<EFBFBD>u<EFBFBD>W<EFBFBD>F<EFBFBD>N<EFBFBD>g<EFBFBD>́A<CD81>ȍ~<7E><><EFBFBD>̃t<CC83>@<40>C<EFBFBD><43><EFBFBD>ɑ΂<C991><CE82><EFBFBD><EFBFBD>A<EFBFBD>N<EFBFBD>Z<EFBFBD>X<EFBFBD>Ɏg<C98E>p<EFBFBD><70><EFBFBD>܂<EFBFBD><DC82>B<EFBFBD>t<EFBFBD>@<40>C<EFBFBD><43><EFBFBD><EFBFBD><EFBFBD>‚<EFBFBD><C282><EFBFBD><EFBFBD>Ƃ<EFBFBD><C682>́A<a href="close.html">f_close()</a><EFBFBD><EFBFBD><EFBFBD>g<EFBFBD>p<EFBFBD><EFBFBD><EFBFBD>܂<EFBFBD><EFBFBD>B<EFBFBD><EFBFBD><EFBFBD><EFBFBD>̕ύX<EFBFBD><EFBFBD><EFBFBD>s<EFBFBD><EFBFBD><EFBFBD><EFBFBD>t<EFBFBD>@<40>C<EFBFBD><43><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>‚<EFBFBD><C282><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȃ<EFBFBD><C882><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>A<EFBFBD><41><EFBFBD>̃t<CC83>@<40>C<EFBFBD><43><EFBFBD><EFBFBD><EFBFBD>j<EFBFBD><6A><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EA8D87><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>܂<EFBFBD><DC82>B</p>
<p><EFBFBD>t<EFBFBD>@<40>C<EFBFBD><43><EFBFBD>E<EFBFBD>A<EFBFBD>N<EFBFBD>Z<EFBFBD>X<EFBFBD><58><EFBFBD>J<EFBFBD>n<EFBFBD><6E><EFBFBD><EFBFBD><EFBFBD>O<EFBFBD>ɁA<a href="mount.html">f_mount()</a><EFBFBD><EFBFBD><EFBFBD>g<EFBFBD><EFBFBD><EFBFBD>Ă<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>̘_<EFBFBD><EFBFBD><EFBFBD>h<EFBFBD><EFBFBD><EFBFBD>C<EFBFBD>u<EFBFBD>Ƀ<EFBFBD><EFBFBD>[<5B>N<EFBFBD>E<EFBFBD>G<EFBFBD><47><EFBFBD>A(<28>t<EFBFBD>@<40>C<EFBFBD><43><EFBFBD>E<EFBFBD>V<EFBFBD>X<EFBFBD>e<EFBFBD><65><EFBFBD>E<EFBFBD>I<EFBFBD>u<EFBFBD>W<EFBFBD>F<EFBFBD>N<EFBFBD>g)<29><><EFBFBD>^<5E><><EFBFBD><EFBFBD><EFBFBD>K<EFBFBD>v<EFBFBD><76><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>܂<EFBFBD><DC82>B<EFBFBD><42><EFBFBD>̏<EFBFBD><CC8F><EFBFBD><EFBFBD><EFBFBD><EFBFBD>̌<EFBFBD><CC8C>A<EFBFBD><41><EFBFBD>̘_<CC98><5F><EFBFBD>h<EFBFBD><68><EFBFBD>C<EFBFBD>u<EFBFBD>ɑ΂<C991><CE82>đS<C491>Ẵt<CC83>@<40>C<EFBFBD><43><EFBFBD>֐<EFBFBD><D690><EFBFBD><EFBFBD>g<EFBFBD><67><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɂȂ<C982><C882>܂<EFBFBD><DC82>B</p>
</div>
<div class="para">
<h4><EFBFBD>Ή<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></h4>
<p><EFBFBD>S<EFBFBD>Ă̍\<5C><><EFBFBD>Ŏg<C58E>p<EFBFBD>”\<5C>ł<EFBFBD><C582>B<tt>_FS_READONLY == 1</tt><EFBFBD>̂Ƃ<EFBFBD><EFBFBD>́A<tt>FA_WRITE, FA_CREATE_ALWAYS, FA_CREATE_NEW, FA_OPEN_ALWAYS</tt><EFBFBD>̊e<EFBFBD>t<EFBFBD><EFBFBD><EFBFBD>O<EFBFBD>̓T<EFBFBD>|<7C>[<5B>g<EFBFBD><67><EFBFBD><EFBFBD><EFBFBD>܂<EFBFBD><DC82><EFBFBD><EFBFBD>B</p>
</div>
<div class="para">
<h4><EFBFBD>g<EFBFBD>p<EFBFBD><EFBFBD><EFBFBD>i<EFBFBD>t<EFBFBD>@<40>C<EFBFBD><43><EFBFBD>E<EFBFBD>R<EFBFBD>s<EFBFBD>[<5B>j</h4>
<pre>
void main (void)
{
FATFS fs[2]; // <20>_<EFBFBD><5F><EFBFBD>h<EFBFBD><68><EFBFBD>C<EFBFBD>u<EFBFBD>̃<EFBFBD><CC83>[<5B>N<EFBFBD>E<EFBFBD>G<EFBFBD><47><EFBFBD>A(<28>t<EFBFBD>@<40>C<EFBFBD><43><EFBFBD>E<EFBFBD>V<EFBFBD>X<EFBFBD>e<EFBFBD><65><EFBFBD>E<EFBFBD>I<EFBFBD>u<EFBFBD>W<EFBFBD>F<EFBFBD>N<EFBFBD>g)
FIL fsrc, fdst; // <20>t<EFBFBD>@<40>C<EFBFBD><43><EFBFBD>E<EFBFBD>I<EFBFBD>u<EFBFBD>W<EFBFBD>F<EFBFBD>N<EFBFBD>g
BYTE buffer[4096]; // file copy buffer
FRESULT res; // FatFs function common result code
UINT br, bw; // File R/W count
// <20>h<EFBFBD><68><EFBFBD>C<EFBFBD>u0,1<>Ƀ<EFBFBD><C983>[<5B>N<EFBFBD>E<EFBFBD>G<EFBFBD><47><EFBFBD>A<EFBFBD><41><EFBFBD>^<5E><><EFBFBD><EFBFBD>
f_mount(0, &amp;fs[0]);
f_mount(1, &amp;fs[1]);
// <20>h<EFBFBD><68><EFBFBD>C<EFBFBD>u1<75>̃\<5C>[<5B>X<EFBFBD>E<EFBFBD>t<EFBFBD>@<40>C<EFBFBD><43><EFBFBD><EFBFBD><EFBFBD>J<EFBFBD><4A>
res = f_open(&amp;fsrc, "1:srcfile.dat", FA_OPEN_EXISTING | FA_READ);
if (res) die(res);
// <20>h<EFBFBD><68><EFBFBD>C<EFBFBD>u0<75>Ƀf<C983>X<EFBFBD>e<EFBFBD>B<EFBFBD>l<EFBFBD>[<5B>V<EFBFBD><56><EFBFBD><EFBFBD><EFBFBD>E<EFBFBD>t<EFBFBD>@<40>C<EFBFBD><43><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EC90AC><EFBFBD><EFBFBD>
res = f_open(&amp;fdst, "0:dstfile.dat", FA_CREATE_ALWAYS | FA_WRITE);
if (res) die(res);
// <20>\<5C>[<5B>X<EFBFBD><58><EFBFBD><EFBFBD><EFBFBD>f<EFBFBD>X<EFBFBD>e<EFBFBD>B<EFBFBD>l<EFBFBD>[<5B>V<EFBFBD><56><EFBFBD><EFBFBD><EFBFBD>ɃR<C983>s<EFBFBD>[<5B><><EFBFBD><EFBFBD>
for (;;) {
res = f_read(&amp;fsrc, buffer, sizeof(buffer), &amp;br);
if (res || br == 0) break; // error or eof
res = f_write(&amp;fdst, buffer, br, &amp;bw);
if (res || bw &lt; br) break; // error or disk full
}
// <20>S<EFBFBD>Ẵt<CC83>@<40>C<EFBFBD><43><EFBFBD><EFBFBD><EFBFBD>‚<EFBFBD><C282><EFBFBD>
f_close(&amp;fsrc);
f_close(&amp;fdst);
// <20><><EFBFBD>[<5B>N<EFBFBD>E<EFBFBD>G<EFBFBD><47><EFBFBD>A<EFBFBD><41><EFBFBD>J<EFBFBD><4A><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
f_mount(0, NULL);
f_mount(1, NULL);
}
</pre>
</div>
<div class="para">
<h4><EFBFBD>Q<EFBFBD><EFBFBD></h4>
<p><tt><a href="read.html">f_read</a>, <a href="write.html">f_write</a>, <a href="close.html">f_close</a>, <a href="sfile.html">FIL</a>, <a href="sfatfs.html">FATFS</a></tt></p>
</div>
<p class="foot"><a href="../00index_j.html"><EFBFBD>߂<EFBFBD></a></p>
</body>
</html>