blob: 23751c6476c1fadd64e6e4ac7f6c81d7d8988906 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
|
<!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>˜_—�ƒhƒ‰ƒCƒu�ã‚Ì–¢Žg—pƒNƒ‰ƒXƒ^�”‚𓾂܂·�B</p>
<pre>
FRESULT f_getfree (
const XCHAR* <em>Path</em>, /* ‘Î�Ûƒhƒ‰ƒCƒu‚̃‹�[ƒg�EƒfƒBƒŒƒNƒgƒŠ */
DWORD* <em>Clusters</em>, /* ‹ó‚«ƒNƒ‰ƒXƒ^�”‚ðŠi”[‚·‚é•Ï�”‚ւ̃|ƒCƒ“ƒ^ */
FATFS** <em>FileSystemObject</em> /* ƒtƒ@ƒCƒ‹�EƒVƒXƒeƒ€�EƒIƒuƒWƒFƒNƒg‚ðŽw‚·ƒ|ƒCƒ“ƒ^‚ւ̃|ƒCƒ“ƒ^ */
);
</pre>
</div>
<div class="para">
<h4>ˆø�”</h4>
<dl class="par">
<dt>Path</dt>
<dd>‘Î�ۂ̘_—�ƒhƒ‰ƒCƒu‚̃‹�[ƒgƒfƒBƒŒƒNƒgƒŠ‚Ì<a href="filename.html">ƒpƒX–¼</a>‚ª“ü‚Á‚½<tt>'\0'</tt>‚Å�I‚í‚é•¶Žš—ñ‚ւ̃|ƒCƒ“ƒ^‚ðŽw’肵‚Ü‚·�B</dd>
<dt>Clusters</dt>
<dd>‹ó‚«ƒNƒ‰ƒXƒ^�”‚ðŠi”[‚·‚é<tt>DWORD</tt>•Ï�”‚ւ̃|ƒCƒ“ƒ^‚ðŽw’肵‚Ü‚·�B</dd>
<dt>FileSystemObject</dt>
<dd>‘Î�Ûƒhƒ‰ƒCƒu‚̃tƒ@ƒCƒ‹�EƒVƒXƒeƒ€�EƒIƒuƒWƒFƒNƒg‚ðŽ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>‚ɋ󂫃Nƒ‰ƒXƒ^�”‚ª•Ô‚³‚ê‚Ü‚·�B</dd>
<dt>FR_INVALID_DRIVE</dt>
<dd>ƒhƒ‰ƒCƒu”Ô�†‚ª•s�³�B</dd>
<dt>FR_NOT_READY</dt>
<dd>ƒ�ƒfƒBƒA‚ªƒZƒbƒg‚³‚ê‚Ä‚¢‚È‚¢‚È‚Ç�A•¨—�ƒhƒ‰ƒCƒu‚ª“®�ì•s”\�ó‘Ô�B</dd>
<dt>FR_DISK_ERR</dt>
<dd>ƒfƒBƒXƒN�EƒGƒ‰�[‚É‚æ‚鎸”s�B</dd>
<dt>FR_INT_ERR</dt>
<dd>•s�³‚ÈFAT�\‘¢‚Ü‚½‚Í“à•”ƒGƒ‰�[‚É‚æ‚鎸”s�B</dd>
<dt>FR_NOT_ENABLED</dt>
<dd>‚»‚̘_—�ƒhƒ‰ƒCƒu‚Ƀ��[ƒN�EƒGƒŠƒA‚ª—^‚¦‚ç‚ê‚Ä‚¢‚È‚¢�B</dd>
<dt>FR_NO_FILESYSTEM</dt>
<dd>ƒfƒBƒXƒN�ã‚É—LŒø‚ÈFATƒp�[ƒe�[ƒVƒ‡ƒ“‚ªŒ©‚‚©‚ç‚È‚¢�B</dd>
</dl>
</div>
<div class="para">
<h4>‰ð�à</h4>
<p>˜_—�ƒhƒ‰ƒCƒu�ã‚̋󂫃Nƒ‰ƒXƒ^�”‚ðŽæ“¾‚µ‚Ü‚·�B•Ô‚³‚ꂽƒtƒ@ƒCƒ‹�EƒVƒXƒeƒ€�EƒIƒuƒWƒFƒNƒg‚Ì<tt>csize</tt>ƒ�ƒ“ƒo‚ªƒNƒ‰ƒXƒ^‚ ‚½‚è‚̃ZƒNƒ^�”‚ðŽ¦‚µ‚Ä‚¢‚é‚Ì‚Å�A‚±‚ê‚ðŒ³‚ÉŽÀ�ۂ̋󂫃TƒCƒY‚ªŒvŽZ‚Å‚«‚Ü‚·�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>‚̂Ƃ«Žg—p‰Â”\‚Å‚·�B</p>
</div>
<div class="para">
<h4>Žg—p—á</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>
|