<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://www.easyuo.com/openeuo/wiki/index.php?action=history&amp;feed=atom&amp;title=File.finalize</id>
		<title>File.finalize - Revision history</title>
		<link rel="self" type="application/atom+xml" href="http://www.easyuo.com/openeuo/wiki/index.php?action=history&amp;feed=atom&amp;title=File.finalize"/>
		<link rel="alternate" type="text/html" href="http://www.easyuo.com/openeuo/wiki/index.php?title=File.finalize&amp;action=history"/>
		<updated>2026-04-08T12:29:25Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.26.3</generator>

	<entry>
		<id>http://www.easyuo.com/openeuo/wiki/index.php?title=File.finalize&amp;diff=1032&amp;oldid=prev</id>
		<title>Ximan: Created page with &quot;== Calling Pattern == Call  local f = sl.file(a,b) later:  f.finalize()  == Example Usage ==   local t = {[3.14] = 0.7071, [' una ']=1, test='Some &quot;random&quot; string.'}  local f = s...&quot;</title>
		<link rel="alternate" type="text/html" href="http://www.easyuo.com/openeuo/wiki/index.php?title=File.finalize&amp;diff=1032&amp;oldid=prev"/>
				<updated>2010-11-24T20:08:21Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;quot;== Calling Pattern == Call  local f = sl.file(a,b) later:  f.finalize()  == Example Usage ==   local t = {[3.14] = 0.7071, [&amp;#039; una &amp;#039;]=1, test=&amp;#039;Some &amp;quot;random&amp;quot; string.&amp;#039;}  local f = s...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;== Calling Pattern ==&lt;br /&gt;
Call&lt;br /&gt;
 local f = sl.file(a,b)&lt;br /&gt;
later:&lt;br /&gt;
 f.finalize()&lt;br /&gt;
&lt;br /&gt;
== Example Usage ==&lt;br /&gt;
&lt;br /&gt;
 local t = {[3.14] = 0.7071, [' una ']=1, test='Some &amp;quot;random&amp;quot; string.'}&lt;br /&gt;
 local f = sl.file(getinstalldir()..'scripts/testwrite.dat', 'write')&lt;br /&gt;
 f.tofile(t)&lt;br /&gt;
 f.finalize()&lt;br /&gt;
 f = nil&lt;br /&gt;
 local g = sl.file(getinstalldir()..'scripts/testwrite.dat', 'read')&lt;br /&gt;
 local v = g.readnext()&lt;br /&gt;
 g = nil&lt;br /&gt;
 print(sl.keyvalstr(v))&lt;br /&gt;
&lt;br /&gt;
 --&amp;gt; table keys:values = {&lt;br /&gt;
      una :1,&lt;br /&gt;
     test:Some &amp;quot;random&amp;quot; string.,&lt;br /&gt;
     3.14:0.7071,&lt;br /&gt;
     }&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
&lt;br /&gt;
The finalize method writes flushes the file buffer (if file was opened in 'write' mode) and closes the underlying file. The file object is no longer valid after this operation, except for [[file.reopen|reopen]] calls.&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
* [http://www.easyuo.com/openeuo/wiki/index.php/Simplelib simplelib]&lt;br /&gt;
&lt;br /&gt;
* [[file.readall]]&lt;br /&gt;
&lt;br /&gt;
* [[file.readnext]]&lt;br /&gt;
&lt;br /&gt;
* [[file.reopen]]&lt;br /&gt;
&lt;br /&gt;
* [[file.tofile]]&lt;/div&gt;</summary>
		<author><name>Ximan</name></author>	</entry>

	</feed>