OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [freertos-6.1.1/] [Demo/] [Common/] [FileSystem/] [FatFs-0.7e/] [doc/] [en/] [truncate.html] - Blame information for rev 637

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 606 jeremybenn
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
2
<html lang="en">
3
<head>
4
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
5
<meta http-equiv="Content-Style-Type" content="text/css">
6
<link rel="up" title="FatFs" href="../00index_e.html">
7
<link rel="stylesheet" href="../css_e.css" type="text/css" media="screen" title="ELM Default">
8
<title>FatFs - f_truncate</title>
9
</head>
10
 
11
<body>
12
 
13
<div class="para">
14
<h2>f_truncate</h2>
15
<p>The f_truncate function truncates the file size.</p>
16
<pre>
17
FRESULT f_truncate (
18
  FIL* <em>FileObject</em>     /* Pointer to the file object */
19
);
20
</pre>
21
</div>
22
 
23
<div class="para">
24
<h4>Parameter</h4>
25
<dl class="par">
26
<dt>FileObject</dt>
27
<dd>Pointer to the open file object to be truncated.</dd>
28
</dl>
29
</div>
30
 
31
 
32
<div class="para">
33
<h4>Return Values</h4>
34
<dl class="ret">
35
<dt>FR_OK (0)</dt>
36
<dd>The function succeeded.</dd>
37
<dt>FR_DENIED</dt>
38
<dd>The file has been opened in read-only mode.</dd>
39
<dt>FR_DISK_ERR</dt>
40
<dd>The function failed due to an error in the disk function.</dd>
41
<dt>FR_INT_ERR</dt>
42
<dd>The function failed due to a wrong FAT structure or an internal error.</dd>
43
<dt>FR_NOT_READY</dt>
44
<dd>The disk drive cannot work due to no medium in the drive or any other reason.</dd>
45
<dt>FR_INVALID_OBJECT</dt>
46
<dd>The file object is invalid.</dd>
47
</dl>
48
</div>
49
 
50
 
51
<div class="para">
52
<h4>Description</h4>
53
<p>The f_truncate function truncates the file size to the current file R/W point. When the file R/W pointer is already pointing end of the file, this function has no effect.</p>
54
</div>
55
 
56
 
57
<div class="para">
58
<h4>QuickInfo</h4>
59
<p>Available when <tt>_FS_READONLY == 0</tt> and <tt>_FS_MINIMIZE == 0</tt>.</p>
60
</div>
61
 
62
 
63
<div class="para">
64
<h4>See Also</h4>
65
<p><tt><a href="open.html">f_open</a>, <a href="lseek.html">f_lseek</a>, <a href="sfile.html">FIL</a></tt></p>
66
</div>
67
 
68
 
69
<p class="foot"><a href="../00index_e.html">Return</a></p>
70
</body>
71
</html>

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.