FIL* <spanclass="arg">fp</span><spanclass="c">/* [IN] Pointer to the file object */</span>
);
</pre>
</div>
<divclass="para arg">
<h4>Parameter</h4>
<dlclass="par">
<dt>fp</dt>
<dd>Pointer to the open file object structure to be closed.</dd>
</dl>
</div>
<divclass="para ret">
<h4>Return Values</h4>
<p>
<ahref="rc.html#ok">FR_OK</a>,
<ahref="rc.html#de">FR_DISK_ERR</a>,
<ahref="rc.html#ie">FR_INT_ERR</a>,
<ahref="rc.html#nr">FR_NOT_READY</a>,
<ahref="rc.html#io">FR_INVALID_OBJECT</a>,
<ahref="rc.html#tm">FR_TIMEOUT</a>
</p>
</div>
<divclass="para desc">
<h4>Description</h4>
<p>The <tt>f_close()</tt> function closes an open file object. If any data has been written to the file, the cached information of the file is written back to the volume. After the function succeeded, the file object is no longer valid and it can be discarded.</p>
<p>Note that if the file object is in read-only mode and <tt>_FS_LOCK</tt> option is not enabled, the file object can also be discarded without this process. However this is not recommended for future compatibility.</p>