1<!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=utf-8"> 5<meta http-equiv="Content-Style-Type" content="text/css"> 6<link rel="stylesheet" href="../css_e.css" type="text/css" media="screen" title="ELM Default"> 7<title>FatFs - f_size</title> 8</head> 9 10<body> 11 12<div class="para func"> 13<h2>f_size</h2> 14<p>The f_size function gets the size of a file.</p> 15<pre> 16FSIZE_t f_size ( 17 FIL* <span class="arg">fp</span> <span class="c">/* [IN] File object */</span> 18); 19</pre> 20</div> 21 22 23<div class="para arg"> 24<h4>Parameters</h4> 25<dl class="par"> 26<dt>fp</dt> 27<dd>Pointer to the open file object structure.</dd> 28</dl> 29</div> 30 31 32<div class="para ret"> 33<h4>Return Values</h4> 34<p>Returns the size of the file in unit of byte.</p> 35</div> 36 37 38<div class="para desc"> 39<h4>Description</h4> 40<p>In this revision, the <tt>f_size</tt> function is implemented as a macro. It does not have any validation and mutual exclusion.</p> 41<pre> 42<span class="k">#define</span> f_size(fp) ((fp)->obj.objsize) 43</pre> 44</div> 45 46 47<div class="para comp"> 48<h4>QuickInfo</h4> 49<p>Always available.</p> 50</div> 51 52 53<div class="para ref"> 54<h4>See Also</h4> 55<p><tt><a href="open.html">f_open</a>, <a href="lseek.html">f_lseek</a>, <a href="sfile.html">FIL</a></tt></p> 56</div> 57 58 59<p class="foot"><a href="../00index_e.html">Return</a></p> 60</body> 61</html> 62