<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.kolmafia.us/index.php?action=history&amp;feed=atom&amp;title=Buffer_to_file</id>
	<title>Buffer to file - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.kolmafia.us/index.php?action=history&amp;feed=atom&amp;title=Buffer_to_file"/>
	<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=Buffer_to_file&amp;action=history"/>
	<updated>2026-04-25T00:03:05Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.44.0</generator>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=Buffer_to_file&amp;diff=8834&amp;oldid=prev</id>
		<title>Philmasterplus at 05:33, 21 December 2020</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=Buffer_to_file&amp;diff=8834&amp;oldid=prev"/>
		<updated>2020-12-21T05:33:29Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 05:33, 21 December 2020&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l9&quot;&gt;Line 9:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 9:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|function1.param2.type=string&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|function1.param2.type=string&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|function1.param2.description=Path to the text file to save&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|function1.param2.description=Path to the text file to save&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|description=&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;p&amp;gt;&lt;/del&gt;This function was added in [https://kolmafia.us/threads/19439-you-can-create-a-bottle-of-sea-wine-by-using-a-bunch-of-sea-grapes-add-some-a.24054/ r19439].&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;/p&amp;gt;&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|description=This function was added in [https://kolmafia.us/threads/19439-you-can-create-a-bottle-of-sea-wine-by-using-a-bunch-of-sea-grapes-add-some-a.24054/ r19439].&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|code1={{CodeSample&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|code1={{CodeSample&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;   |title=Code Samples&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;   |title=Code Samples&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Philmasterplus</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=Buffer_to_file&amp;diff=8832&amp;oldid=prev</id>
		<title>Philmasterplus: Created page with &quot;&lt;onlyinclude&gt;{{{{{format|Function2}}} |name=buffer_to_file |function1.return_type=boolean |function1.description=Saves a buffer to a text file. Returns &lt;code&gt;true&lt;/code&gt; on su...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=Buffer_to_file&amp;diff=8832&amp;oldid=prev"/>
		<updated>2020-12-21T05:32:20Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;&amp;lt;onlyinclude&amp;gt;{{{{{format|Function2}}} |name=buffer_to_file |function1.return_type=boolean |function1.description=Saves a buffer to a text file. Returns &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; on su...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;lt;onlyinclude&amp;gt;{{{{{format|Function2}}}&lt;br /&gt;
|name=buffer_to_file&lt;br /&gt;
|function1.return_type=boolean&lt;br /&gt;
|function1.description=Saves a buffer to a text file. Returns &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; on success, &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt; on failure.&lt;br /&gt;
|function1.param1=data&lt;br /&gt;
|function1.param1.type=buffer&lt;br /&gt;
|function1.param1.description=Buffer to save&lt;br /&gt;
|function1.param2=filepath&lt;br /&gt;
|function1.param2.type=string&lt;br /&gt;
|function1.param2.description=Path to the text file to save&lt;br /&gt;
|description=&amp;lt;p&amp;gt;This function was added in [https://kolmafia.us/threads/19439-you-can-create-a-bottle-of-sea-wine-by-using-a-bunch-of-sea-grapes-add-some-a.24054/ r19439].&amp;lt;/p&amp;gt;&lt;br /&gt;
|code1={{CodeSample&lt;br /&gt;
  |title=Code Samples&lt;br /&gt;
  |description=Saves a string (automatically converted to a {{type|buffer}}) to a text file.&lt;br /&gt;
  |code=&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;d&amp;quot;&amp;gt;&lt;br /&gt;
string contents = &amp;quot;Hello, world!&amp;quot;;&lt;br /&gt;
if (!buffer_to_file(contents, &amp;quot;mydata.txt&amp;quot;)) {&lt;br /&gt;
   abort(&amp;quot;Failed to save data to mydata.txt&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
  |moreinfo=&lt;br /&gt;
}}&lt;br /&gt;
|see_also={{SeeAlso|file_to_array|file_to_buffer|file_to_map|map_to_file}}&lt;br /&gt;
|cli_equiv=&lt;br /&gt;
|more_info=&lt;br /&gt;
|special=&lt;br /&gt;
|{{{1|}}}&lt;br /&gt;
}}&amp;lt;/onlyinclude&amp;gt;&lt;br /&gt;
[[Category:Miscellaneous Functions]]&lt;/div&gt;</summary>
		<author><name>Philmasterplus</name></author>
	</entry>
</feed>