{{newin|[[0.9.0]]|090|type=function}}
Flushes any buffered written data in the file to the disk.
== Function ==
=== Synopsis ===
<source lang="lua">
success, err = File:flush( )
</source>
=== Arguments ===
None.
=== Returns ===
{{param|boolean|success|Whether the file successfully flushed any buffered data to the disk.}}
{{param|string|err (nil)|The error string, if an error occurred and the file could not be flushed.}}
== See Also ==
* [[parent::File]]
* [[(File):write|File:write]]
* [[(File):setBuffer|File:setBuffer]]
[[Category:Functions]]
{{#set:Description=Flushes any buffered written data in the file to disk.}}
== Other Languages ==
{{i18n|(File):flush}}