<!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_getfree</title> | |
</head> | |
<body> | |
<div class="para"> | |
<h2>f_getfree</h2> | |
<p>_hCuãÌ¢gpNX^ð¾Ü·B</p> | |
<pre> | |
FRESULT f_getfree ( | |
const XCHAR* <em>Path</em>, /* ÎÛhCuÌ[gEfBNg */ | |
DWORD* <em>Clusters</em>, /* ó«NX^ði[·éÏÖÌ|C^ */ | |
FATFS** <em>FileSystemObject</em> /* t@CEVXeEIuWFNgðw·|C^ÖÌ|C^ */ | |
); | |
</pre> | |
</div> | |
<div class="para"> | |
<h4>ø</h4> | |
<dl class="par"> | |
<dt>Path</dt> | |
<dd>ÎÛÌ_hCuÌ[gfBNgÌ<a href="filename.html">pX¼</a>ªüÁ½<tt>'\0'</tt>ÅIíé¶ñÖÌ|C^ðwèµÜ·B</dd> | |
<dt>Clusters</dt> | |
<dd>ó«NX^ði[·é<tt>DWORD</tt>ÏÖÌ|C^ðwèµÜ·B</dd> | |
<dt>FileSystemObject</dt> | |
<dd>ÎÛhCuÌt@CEVXeEIuWFNgðw·|C^ªÔ³êÜ·B</dd> | |
</dl> | |
</div> | |
<div class="para"> | |
<h4>ßèl</h4> | |
<dl class="ret"> | |
<dt>FR_OK (0)</dt> | |
<dd>³íI¹B<tt>*Clusters</tt>Éó«NX^ªÔ³êÜ·B</dd> | |
<dt>FR_INVALID_DRIVE</dt> | |
<dd>hCuÔªs³B</dd> | |
<dt>FR_NOT_READY</dt> | |
<dd>fBAªZbg³êĢȢÈÇA¨hCuª®ìs\óÔB</dd> | |
<dt>FR_DISK_ERR</dt> | |
<dd>fBXNEG[Éæé¸sB</dd> | |
<dt>FR_INT_ERR</dt> | |
<dd>s³ÈFAT\¢Ü½ÍàG[Éæé¸sB</dd> | |
<dt>FR_NOT_ENABLED</dt> | |
<dd>»Ì_hCuÉ[NEGAª^¦çêĢȢB</dd> | |
<dt>FR_NO_FILESYSTEM</dt> | |
<dd>fBXNãÉLøÈFATp[e[Vª©Â©çÈ¢B</dd> | |
</dl> | |
</div> | |
<div class="para"> | |
<h4>ðà</h4> | |
<p>_hCuãÌó«NX^ð澵ܷBÔ³ê½t@CEVXeEIuWFNgÌ<tt>csize</tt>oªNX^ ½èÌZN^ð¦µÄ¢éÌÅA±êð³ÉÀÛÌó«TCYªvZÅ«Ü·BFAT32{ [ɨ¢ÄÍAFSINFOÌóÔÉæÁÄÍs³mÈlðÔµ½èAÉÔª©©Á½è·éÂ\«ª èÜ·B</p> | |
</div> | |
<div class="para"> | |
<h4>Îîñ</h4> | |
<p><tt>_FS_READONLY == 0</tt>ÅAÂ<tt>_FS_MINIMIZE == 0</tt>ÌÆ«gpÂ\Å·B</p> | |
</div> | |
<div class="para"> | |
<h4>gpá</h4> | |
<pre> | |
FATFS *fs; | |
DWORD fre_clust, fre_sect, tot_sect; | |
/* Get drive information and free clusters */ | |
res = f_getfree("/", &fre_clust, &fs); | |
if (res) die(res); | |
/* Get total sectors and free sectors */ | |
tot_sect = (fs->max_clust - 2) * fs->csize; | |
fre_sect = fre_clust * fs->csize; | |
/* Print free space in unit of KB (assuming 512B/sector) */ | |
printf("%lu KB total drive space.\n" | |
"%lu KB available.\n", | |
fre_sect / 2, tot_sect / 2); | |
</pre> | |
</div> | |
<div class="para"> | |
<h4>QÆ</h4> | |
<tt><a href="sfatfs.html">FATFS</a></tt> | |
</div> | |
<p class="foot"><a href="../00index_j.html">ßé</a></p> | |
</body> | |
</html> |