]> cloudbase.mooo.com Git - z180-stamp.git/blame - fatfs/documents/doc/truncate.html
Import fatfs R0.13b
[z180-stamp.git] / fatfs / documents / doc / truncate.html
CommitLineData
53668523
L
1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">\r
2<html lang="en">\r
3<head>\r
289f6a14 4<meta http-equiv="Content-Type" content="text/html; charset=utf-8">\r
53668523
L
5<meta http-equiv="Content-Style-Type" content="text/css">\r
6<link rel="up" title="FatFs" href="../00index_e.html">\r
7<link rel="alternate" hreflang="ja" title="Japanese" href="../ja/truncate.html">\r
8<link rel="stylesheet" href="../css_e.css" type="text/css" media="screen" title="ELM Default">\r
9<title>FatFs - f_truncate</title>\r
10</head>\r
11\r
12<body>\r
13\r
14<div class="para func">\r
15<h2>f_truncate</h2>\r
16<p>The f_truncate function truncates the file size.</p>\r
17<pre>\r
18FRESULT f_truncate (\r
19 FIL* <span class="arg">fp</span> <span class="c">/* [IN] File object */</span>\r
20);\r
21</pre>\r
22</div>\r
23\r
24<div class="para arg">\r
25<h4>Parameter</h4>\r
26<dl class="par">\r
27<dt>fp</dt>\r
28<dd>Pointer to the open file object to be truncated.</dd>\r
29</dl>\r
30</div>\r
31\r
32\r
33<div class="para ret">\r
34<h4>Return Values</h4>\r
35<p>\r
36<a href="rc.html#ok">FR_OK</a>,\r
37<a href="rc.html#de">FR_DISK_ERR</a>,\r
38<a href="rc.html#ie">FR_INT_ERR</a>,\r
70702af1 39<a href="rc.html#dn">FR_DENIED</a>,\r
53668523
L
40<a href="rc.html#io">FR_INVALID_OBJECT</a>,\r
41<a href="rc.html#tm">FR_TIMEOUT</a>\r
42</p>\r
43</div>\r
44\r
45\r
46<div class="para desc">\r
47<h4>Description</h4>\r
70702af1 48<p>The <tt>f_truncate</tt> function truncates the file size to the current file read/write pointer. This function has no effect if the file read/write pointer is already pointing end of the file.</p>\r
53668523
L
49</div>\r
50\r
51\r
52<div class="para comp">\r
53<h4>QuickInfo</h4>\r
289f6a14 54<p>Available when <tt><a href="config.html#fs_readonly">FF_FS_READONLY</a> == 0</tt> and <tt><a href="config.html#fs_minimize">FF_FS_MINIMIZE</a> == 0</tt>.</p>\r
53668523
L
55</div>\r
56\r
57\r
58<div class="para ref">\r
59<h4>See Also</h4>\r
60<p><tt><a href="open.html">f_open</a>, <a href="lseek.html">f_lseek</a>, <a href="sfile.html">FIL</a></tt></p>\r
61</div>\r
62\r
63\r
64<p class="foot"><a href="../00index_e.html">Return</a></p>\r
65</body>\r
66</html>\r