<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="http://ubersoft.org/Sputnik/wiki/skins/common/feed.css?301"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-gb">
		<id>http://ubersoft.org/Sputnik/wiki/index.php?action=history&amp;feed=atom&amp;title=Core_Function_FileWriteLines</id>
		<title>Core Function FileWriteLines - Revision history</title>
		<link rel="self" type="application/atom+xml" href="http://ubersoft.org/Sputnik/wiki/index.php?action=history&amp;feed=atom&amp;title=Core_Function_FileWriteLines"/>
		<link rel="alternate" type="text/html" href="http://ubersoft.org/Sputnik/wiki/index.php?title=Core_Function_FileWriteLines&amp;action=history"/>
		<updated>2026-04-12T04:34:38Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.17.0</generator>

	<entry>
		<id>http://ubersoft.org/Sputnik/wiki/index.php?title=Core_Function_FileWriteLines&amp;diff=5681&amp;oldid=prev</id>
		<title>UberFoX: /* Example */</title>
		<link rel="alternate" type="text/html" href="http://ubersoft.org/Sputnik/wiki/index.php?title=Core_Function_FileWriteLines&amp;diff=5681&amp;oldid=prev"/>
				<updated>2015-06-18T10:37:28Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;Example&lt;/span&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: white; color:black;&quot;&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
		&lt;tr valign='top'&gt;
		&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;← Older revision&lt;/td&gt;
		&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 10:37, 18 June 2015&lt;/td&gt;
		&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 69:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 69:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;	FileWrite( $File, &amp;quot;Test\n&amp;quot; );&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;	FileWrite( $File, &amp;quot;Test\n&amp;quot; );&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;	FileWrite( $File, &amp;quot;Test2\n&amp;quot; );&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;	FileWrite( $File, &amp;quot;Test2\n&amp;quot; );&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;minus;&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;	FileWriteLines( $File, array(&amp;quot;One&amp;quot;, &amp;quot;Two&amp;quot;, &amp;quot;Three&amp;quot;, &amp;quot;Four&amp;quot;), &amp;quot;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;&amp;amp;lt;&lt;/del&gt;br&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;&amp;amp;gt;&lt;/del&gt;&amp;quot; );&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;	FileWriteLines( $File, array(&amp;quot;One&amp;quot;, &amp;quot;Two&amp;quot;, &amp;quot;Three&amp;quot;, &amp;quot;Four&amp;quot;), &amp;quot;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;lt;&lt;/ins&gt;br&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;gt;&lt;/ins&gt;&amp;quot; );&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;	FileClose( $File );&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;	FileClose( $File );&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;}&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>UberFoX</name></author>	</entry>

	<entry>
		<id>http://ubersoft.org/Sputnik/wiki/index.php?title=Core_Function_FileWriteLines&amp;diff=5680&amp;oldid=prev</id>
		<title>UberFoX: /* Example */</title>
		<link rel="alternate" type="text/html" href="http://ubersoft.org/Sputnik/wiki/index.php?title=Core_Function_FileWriteLines&amp;diff=5680&amp;oldid=prev"/>
				<updated>2015-06-18T10:37:16Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;Example&lt;/span&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: white; color:black;&quot;&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
		&lt;tr valign='top'&gt;
		&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;← Older revision&lt;/td&gt;
		&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 10:37, 18 June 2015&lt;/td&gt;
		&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 61:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 61:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;minus;&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Lets use &amp;quot;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;&amp;lt;&lt;/del&gt;br&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;&amp;gt;&lt;/del&gt;&amp;quot; for the line breaks&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Lets use &amp;quot;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;amp;lt;&lt;/ins&gt;br&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;amp;gt;&lt;/ins&gt;&amp;quot; for the line breaks&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 69:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 69:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;	FileWrite( $File, &amp;quot;Test\n&amp;quot; );&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;	FileWrite( $File, &amp;quot;Test\n&amp;quot; );&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;	FileWrite( $File, &amp;quot;Test2\n&amp;quot; );&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;	FileWrite( $File, &amp;quot;Test2\n&amp;quot; );&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;minus;&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;	FileWriteLines( $File, array(&amp;quot;One&amp;quot;, &amp;quot;Two&amp;quot;, &amp;quot;Three&amp;quot;, &amp;quot;Four&amp;quot;), &amp;quot;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;&amp;lt;&lt;/del&gt;br&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;&amp;gt;&lt;/del&gt;&amp;quot; );&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;	FileWriteLines( $File, array(&amp;quot;One&amp;quot;, &amp;quot;Two&amp;quot;, &amp;quot;Three&amp;quot;, &amp;quot;Four&amp;quot;), &amp;quot;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;amp;lt;&lt;/ins&gt;br&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;amp;gt;&lt;/ins&gt;&amp;quot; );&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;	FileClose( $File );&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;	FileClose( $File );&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;}&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>UberFoX</name></author>	</entry>

	<entry>
		<id>http://ubersoft.org/Sputnik/wiki/index.php?title=Core_Function_FileWriteLines&amp;diff=5677&amp;oldid=prev</id>
		<title>UberFoX: Created page with &quot;&lt;pre&gt; FileWriteLines( &lt;file&gt;, &lt;array&gt;, &lt;lineBreak&gt;, &lt;useAscii&gt; ) &lt;/pre&gt;  === Description ===  Write an array of lines to previously opened file at the current File Steam pointer ...&quot;</title>
		<link rel="alternate" type="text/html" href="http://ubersoft.org/Sputnik/wiki/index.php?title=Core_Function_FileWriteLines&amp;diff=5677&amp;oldid=prev"/>
				<updated>2015-06-18T10:30:37Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;quot;&amp;lt;pre&amp;gt; FileWriteLines( &amp;lt;file&amp;gt;, &amp;lt;array&amp;gt;, &amp;lt;lineBreak&amp;gt;, &amp;lt;useAscii&amp;gt; ) &amp;lt;/pre&amp;gt;  === Description ===  Write an array of lines to previously opened file at the current File Steam pointer ...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
FileWriteLines( &amp;lt;file&amp;gt;, &amp;lt;array&amp;gt;, &amp;lt;lineBreak&amp;gt;, &amp;lt;useAscii&amp;gt; )&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Description ===&lt;br /&gt;
&lt;br /&gt;
Write an array of lines to previously opened file at the current File Steam pointer location.&lt;br /&gt;
&lt;br /&gt;
=== Parameters ===&lt;br /&gt;
&lt;br /&gt;
==== file  ====&lt;br /&gt;
&lt;br /&gt;
A variable containing the File handle.&lt;br /&gt;
&lt;br /&gt;
==== array ====&lt;br /&gt;
&lt;br /&gt;
The array to write to the file.&lt;br /&gt;
&lt;br /&gt;
Each element in the array will be considered a new line for the file.&lt;br /&gt;
&lt;br /&gt;
==== lineBreak ====&lt;br /&gt;
&lt;br /&gt;
Optional; The line break to use.&lt;br /&gt;
&lt;br /&gt;
Default: &amp;quot;\n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==== useAscii ====&lt;br /&gt;
&lt;br /&gt;
Optional: Flag to decide if ASCII encoding should be used&lt;br /&gt;
&lt;br /&gt;
True = Save using ASCII encoding&lt;br /&gt;
&lt;br /&gt;
False = Save using UNICODE encoding&lt;br /&gt;
&lt;br /&gt;
Default: false (All strings in Sputnik are Unicode to save them to file you must specifically request ASCII encoding)&lt;br /&gt;
&lt;br /&gt;
=== Return Value ===&lt;br /&gt;
&lt;br /&gt;
Success: Returns true&lt;br /&gt;
&lt;br /&gt;
Failure: Returns false if error occurs.&lt;br /&gt;
&lt;br /&gt;
=== Remarks ===&lt;br /&gt;
&lt;br /&gt;
You can set the File Steam pointer location with [[Core Function FileSeek|FileSeek( )]].&lt;br /&gt;
&lt;br /&gt;
Warning this will not write to the end of the file unless you tell it to with seek so if you want to write to end of the file you should use [[Core Function FileAppendLines|FileAppendLines(  )]] instead.&lt;br /&gt;
&lt;br /&gt;
=== Example ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$File = FileOpen(&amp;quot;a.txt&amp;quot;, &amp;quot;w&amp;quot;);&lt;br /&gt;
If(isVarObj($File, &amp;quot;file&amp;quot;))&lt;br /&gt;
{&lt;br /&gt;
	FileWrite( $File, &amp;quot;Test\n&amp;quot; );&lt;br /&gt;
	FileWrite( $File, &amp;quot;Test2\n&amp;quot; );&lt;br /&gt;
	FileWriteLines( $File, array(&amp;quot;One&amp;quot;, &amp;quot;Two&amp;quot;, &amp;quot;Three&amp;quot;, &amp;quot;Four&amp;quot;) );&lt;br /&gt;
	FileClose( $File );&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Lets use &amp;quot;&amp;lt;br&amp;gt;&amp;quot; for the line breaks&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$File = FileOpen(&amp;quot;a.txt&amp;quot;, &amp;quot;w&amp;quot;);&lt;br /&gt;
If(isVarObj($File, &amp;quot;file&amp;quot;))&lt;br /&gt;
{&lt;br /&gt;
	FileWrite( $File, &amp;quot;Test\n&amp;quot; );&lt;br /&gt;
	FileWrite( $File, &amp;quot;Test2\n&amp;quot; );&lt;br /&gt;
	FileWriteLines( $File, array(&amp;quot;One&amp;quot;, &amp;quot;Two&amp;quot;, &amp;quot;Three&amp;quot;, &amp;quot;Four&amp;quot;), &amp;quot;&amp;lt;br&amp;gt;&amp;quot; );&lt;br /&gt;
	FileClose( $File );&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Core Function]]&lt;/div&gt;</summary>
		<author><name>UberFoX</name></author>	</entry>

	</feed>