]> cloudbase.mooo.com Git - z180-stamp.git/blobdiff - fatfs/documents/doc/sync.html
Import fatfs R0.13b
[z180-stamp.git] / fatfs / documents / doc / sync.html
diff --git a/fatfs/documents/doc/sync.html b/fatfs/documents/doc/sync.html
new file mode 100644 (file)
index 0000000..a0317d6
--- /dev/null
@@ -0,0 +1,65 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">\r
+<html lang="en">\r
+<head>\r
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">\r
+<meta http-equiv="Content-Style-Type" content="text/css">\r
+<link rel="up" title="FatFs" href="../00index_e.html">\r
+<link rel="alternate" hreflang="ja" title="Japanese" href="../ja/sync.html">\r
+<link rel="stylesheet" href="../css_e.css" type="text/css" media="screen" title="ELM Default">\r
+<title>FatFs - f_sync</title>\r
+</head>\r
+\r
+<body>\r
+\r
+<div class="para func">\r
+<h2>f_sync</h2>\r
+<p>The f_sync function flushes the cached information of a writing file.</p>\r
+<pre>\r
+FRESULT f_sync (\r
+  FIL* <span class="arg">fp</span>     <span class="c">/* [IN] File object */</span>\r
+);\r
+</pre>\r
+</div>\r
+\r
+<div class="para arg">\r
+<h4>Parameter</h4>\r
+<dl class="par">\r
+<dt>fp</dt>\r
+<dd>Pointer to the open file object to be flushed.</dd>\r
+</dl>\r
+</div>\r
+\r
+\r
+<div class="para ret">\r
+<h4>Return Values</h4>\r
+<p>\r
+<a href="rc.html#ok">FR_OK</a>,\r
+<a href="rc.html#de">FR_DISK_ERR</a>,\r
+<a href="rc.html#ie">FR_INT_ERR</a>,\r
+<a href="rc.html#io">FR_INVALID_OBJECT</a>,\r
+<a href="rc.html#tm">FR_TIMEOUT</a>\r
+</p>\r
+</div>\r
+\r
+\r
+<div class="para desc">\r
+<h4>Description</h4>\r
+<p>The <tt>f_sync</tt> function performs the same process as <tt>f_close</tt> function but the file is left opened and can continue read/write/seek operations to the file. This is suitable for the applications that open files for a long time in write mode, such as data logger. Performing <tt>f_sync</tt> function of periodic or immediataly after <tt>f_write</tt> function can minimize the risk of data loss due to a sudden blackout or an unintentional media removal. For more information, refer to <a href="appnote.html#critical">application note</a>.</p>\r
+<p>However there is no sense in <tt>f_sync</tt> function immediataly before <tt>f_close</tt> function because it performs <tt>f_sync</tt> function in it. In other words, the differnce between those functions is that the file object is invalidated or not.</p>\r
+</div>\r
+\r
+\r
+<div class="para comp">\r
+<h4>QuickInfo</h4>\r
+<p>Available when <tt><a href="config.html#fs_readonly">FF_FS_READONLY</a> == 0</tt>.</p>\r
+</div>\r
+\r
+\r
+<div class="para ref">\r
+<h4>See Also</h4>\r
+<p><tt><a href="close.html">f_close</a></tt>, <a href="appnote.html#critical">Critical section</a></p>\r
+</div>\r
+\r
+<p class="foot"><a href="../00index_e.html">Return</a></p>\r
+</body>\r
+</html>\r