ugfx/3rdparty/fatfs-0.10b/doc/ja/getfree.html

96 lines
3.2 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="alternate" hreflang="en" title="English" href="../en/getfree.html">
<link rel="stylesheet" href="../css_j.css" type="text/css" media="screen" title="ELM Default">
<title>FatFs - f_getfree</title>
</head>
<body>
<div class="para func">
<h2>f_getfree</h2>
<p><EFBFBD>{<7B><><EFBFBD><EFBFBD><EFBFBD>[<5B><><EFBFBD><EFBFBD><EFBFBD>̋󂫗̈<F382AB97><CC88>̃T<CC83>C<EFBFBD>Y<EFBFBD><59><EFBFBD><EFBFBD><E693BE><EFBFBD>܂<EFBFBD><DC82>B</p>
<pre>
FRESULT f_getfree (
const TCHAR* <span class="arg">path</span>, <span class="c">/* [IN] <20>Ώۃh<DB83><68><EFBFBD>C<EFBFBD>u<EFBFBD><75><EFBFBD>w<EFBFBD><EFBFBD>܂<EFBFBD> */</span>
DWORD* <span class="arg">nclst</span>, <span class="c">/* [OUT] <20>󂫃N<F382AB83><4E><EFBFBD>X<EFBFBD>^<5E><><EFBFBD><EFBFBD><EFBFBD>i<EFBFBD>[<5B><><EFBFBD><EFBFBD><EFBFBD>ϐ<EFBFBD><CF90>ւ̃|<7C>C<EFBFBD><43><EFBFBD>^ */</span>
FATFS** <span class="arg">fatfs</span> <span class="c">/* [OUT] <20>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<EFBFBD><67><EFBFBD>w<EFBFBD><77><EFBFBD>|<7C>C<EFBFBD><43><EFBFBD>^<5E>ւ̃|<7C>C<EFBFBD><43><EFBFBD>^ */</span>
);
</pre>
</div>
<div class="para arg">
<h4><EFBFBD><EFBFBD><EFBFBD><EFBFBD></h4>
<dl class="par">
<dt>path</dt>
<dd><EFBFBD><EFBFBD><EFBFBD>ׂ<EFBFBD><EFBFBD>Ώۂ̘_<EFBFBD><EFBFBD><EFBFBD>h<EFBFBD><EFBFBD><EFBFBD>C<EFBFBD>u<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><a href="filename.html"><EFBFBD>p<EFBFBD>X<EFBFBD><EFBFBD></a><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>k<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><tt>'\0'</tt><EFBFBD>I<EFBFBD>[<5B>̕<EFBFBD><CC95><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ւ̃|<7C>C<EFBFBD><43><EFBFBD>^<5E><><EFBFBD>w<EFBFBD><EFBFBD>܂<EFBFBD><DC82>B<EFBFBD>k<EFBFBD><6B><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>̓J<CD83><4A><EFBFBD><EFBFBD><EFBFBD>g<EFBFBD>E<EFBFBD>h<EFBFBD><68><EFBFBD>C<EFBFBD>u<EFBFBD><75><EFBFBD>Ӗ<EFBFBD><D396><EFBFBD><EFBFBD>܂<EFBFBD><DC82>B</dd>
<dt>nclst</dt>
<dd><EFBFBD>󂫃N<EFBFBD><EFBFBD><EFBFBD>X<EFBFBD>^<5E><><EFBFBD><EFBFBD><EFBFBD>i<EFBFBD>[<5B><><EFBFBD><EFBFBD><tt>DWORD</tt><EFBFBD>^<5E>ϐ<EFBFBD><CF90>ւ̃|<7C>C<EFBFBD><43><EFBFBD>^<5E><><EFBFBD>w<EFBFBD><EFBFBD>܂<EFBFBD><DC82>B</dd>
<dt>fatfs</dt>
<dd><EFBFBD>Ώۃh<EFBFBD><EFBFBD><EFBFBD>C<EFBFBD>u<EFBFBD>̃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<EFBFBD><67><EFBFBD>w<EFBFBD><77><EFBFBD>|<7C>C<EFBFBD><43><EFBFBD>^<5E><><EFBFBD>Ԃ<EFBFBD><D482><EFBFBD><EFBFBD>܂<EFBFBD><DC82>B</dd>
</dl>
</div>
<div class="para ret">
<h4><EFBFBD>߂<EFBFBD><EFBFBD>l</h4>
<p>
<a href="rc.html#ok">FR_OK</a>,
<a href="rc.html#de">FR_DISK_ERR</a>,
<a href="rc.html#ie">FR_INT_ERR</a>,
<a href="rc.html#nr">FR_NOT_READY</a>,
<a href="rc.html#id">FR_INVALID_DRIVE</a>,
<a href="rc.html#ne">FR_NOT_ENABLED</a>,
<a href="rc.html#ns">FR_NO_FILESYSTEM</a>,
<a href="rc.html#tm">FR_TIMEOUT</a>
</p>
</div>
<div class="para desc">
<h4><EFBFBD><EFBFBD><EFBFBD><EFBFBD></h4>
<p><EFBFBD>_<EFBFBD><EFBFBD><EFBFBD>h<EFBFBD><EFBFBD><EFBFBD>C<EFBFBD>u<EFBFBD><EFBFBD><EFBFBD>̋󂫗̈<EFBFBD><EFBFBD>̃T<EFBFBD>C<EFBFBD>Y<EFBFBD><EFBFBD><EFBFBD>N<EFBFBD><EFBFBD><EFBFBD>X<EFBFBD>^<5E>P<EFBFBD>ʂŎ擾<C58E><E693BE><EFBFBD>܂<EFBFBD><DC82>B<EFBFBD>Ԃ<EFBFBD><D482><EFBFBD>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<EFBFBD><67><tt>csize</tt><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>o<EFBFBD><EFBFBD><EFBFBD>N<EFBFBD><EFBFBD><EFBFBD>X<EFBFBD>^<5E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>̃Z<CC83>N<EFBFBD>^<5E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ă<EFBFBD><C482><EFBFBD><EFBFBD>̂ŁA<C581><41><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɃZ<C983>N<EFBFBD>^<5E>P<EFBFBD>ʂ̋󂫃T<F382AB83>C<EFBFBD>Y<EFBFBD><59><EFBFBD>v<EFBFBD>Z<EFBFBD>ł<EFBFBD><C582>܂<EFBFBD><DC82>BFAT32<33>{<7B><><EFBFBD><EFBFBD><EFBFBD>[<5B><><EFBFBD>ɂ<EFBFBD><C982><EFBFBD><EFBFBD>ẮAFSINFO<46>̏<EFBFBD><CC8F>񂪎<EFBFBD><F182AA8E>ۂ̋󂫃N<F382AB83><4E><EFBFBD>X<EFBFBD>^<5E><><EFBFBD>Ɠ<EFBFBD><C693><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ă<EFBFBD><C482>Ȃ<EFBFBD><C882><EFBFBD>A<EFBFBD>s<EFBFBD><73><EFBFBD>m<EFBFBD>Ȓl<C892><6C><EFBFBD>Ԃ<EFBFBD><D482>”\<5C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>܂<EFBFBD><DC82>B<EFBFBD><42><EFBFBD>̖<EFBFBD><CC96><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>߁A<tt>_FS_NOFSINFO</tt><EFBFBD>I<EFBFBD>v<EFBFBD>V<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ń}<7D>E<EFBFBD><45><EFBFBD>g<EFBFBD><67><EFBFBD>̏<EFBFBD><CC8F><EFBFBD><EFBFBD>͕K<CD95><4B><EFBFBD>t<EFBFBD><74>FAT<41>X<EFBFBD>L<EFBFBD><4C><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɍ\<5C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƃ<EFBFBD><C682>ł<EFBFBD><C582>܂<EFBFBD><DC82>B</p>
</div>
<div class="para comp">
<h4><EFBFBD>Ή<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></h4>
<p><tt>_FS_READONLY == 0</tt><EFBFBD>ŁA<EFBFBD><EFBFBD><EFBFBD><EFBFBD><tt>_FS_MINIMIZE == 0</tt><EFBFBD>̂Ƃ<EFBFBD><EFBFBD>g<EFBFBD>p<EFBFBD>”\<5C>ł<EFBFBD><C582>B</p>
</div>
<div class="para use">
<h4><EFBFBD>g<EFBFBD>p<EFBFBD><EFBFBD></h4>
<pre>
FATFS *fs;
DWORD fre_clust, fre_sect, tot_sect;
<span class="c">/* <20>h<EFBFBD><68><EFBFBD>C<EFBFBD>u1<75>̃{<7B><><EFBFBD><EFBFBD><EFBFBD>[<5B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƌ󂫃N<F382AB83><4E><EFBFBD>X<EFBFBD>^<5E><><EFBFBD>𓾂<EFBFBD> */</span>
res = f_getfree("1:", &amp;fre_clust, &amp;fs);
if (res) die(res);
<span class="c">/* <20>S<EFBFBD>Z<EFBFBD>N<EFBFBD>^<5E><><EFBFBD>Ƌ󂫃Z<F382AB83>N<EFBFBD>^<5E><><EFBFBD><EFBFBD><EFBFBD>v<EFBFBD>Z */</span>
tot_sect = (fs->n_fatent - 2) * fs->csize;
fre_sect = fre_clust * fs->csize;
<span class="c">/* <20>{<7B><><EFBFBD><EFBFBD><EFBFBD>[<5B><><EFBFBD>S<EFBFBD>̂̃T<CC83>C<EFBFBD>Y<EFBFBD>Ƌ󂫂̃T<CC83>C<EFBFBD>Y<EFBFBD><59><EFBFBD>\<5C><> (512<31>o<EFBFBD>C<EFBFBD>g/<2F>Z<EFBFBD>N<EFBFBD>^<5E>Ɖ<EFBFBD><C689><EFBFBD>) */</span>
printf("%10lu KiB total drive space.\n%10lu KiB available.\n",
tot_sect / 2, fre_sect / 2);
</pre>
</div>
<div class="para ref">
<h4><EFBFBD>Q<EFBFBD><EFBFBD></h4>
<tt><a href="sfatfs.html">FATFS</a></tt>
</div>
<p class="foot"><a href="../00index_j.html"><EFBFBD>߂<EFBFBD></a></p>
</body>
</html>