<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://95.179.246.60/mediawiki/index.php?action=history&amp;feed=atom&amp;title=Create_a_new_non-existing_file_name</id>
	<title>Create a new non-existing file name - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://95.179.246.60/mediawiki/index.php?action=history&amp;feed=atom&amp;title=Create_a_new_non-existing_file_name"/>
	<link rel="alternate" type="text/html" href="http://95.179.246.60/mediawiki/index.php?title=Create_a_new_non-existing_file_name&amp;action=history"/>
	<updated>2026-05-08T12:45:10Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.39.17</generator>
	<entry>
		<id>http://95.179.246.60/mediawiki/index.php?title=Create_a_new_non-existing_file_name&amp;diff=106&amp;oldid=prev</id>
		<title>Nmingott: imported material</title>
		<link rel="alternate" type="text/html" href="http://95.179.246.60/mediawiki/index.php?title=Create_a_new_non-existing_file_name&amp;diff=106&amp;oldid=prev"/>
		<updated>2025-05-04T20:38:14Z</updated>

		<summary type="html">&lt;p&gt;imported material&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Problem&amp;#039;&amp;#039;&amp;#039; It often happens it is necessary to make a new filename. For example a new log file name, or a new temporary file to contain the output of a Unix program. How to do it?&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Solution&amp;#039;&amp;#039;&amp;#039;. The method to use use &amp;lt;code&amp;gt;DirectoryEntry &amp;gt;&amp;gt; nexNameFor: extension:&amp;lt;/code&amp;gt;. In the example below I create a new filename to be into the directory &amp;#039;&amp;#039;/tmp&amp;#039;&amp;#039;. Observe well the output is a &amp;lt;code&amp;gt;String&amp;lt;/code&amp;gt;, not a &amp;#039;&amp;#039;FileEntry&amp;#039;&amp;#039;, the file is not created, just a name for it.&lt;br /&gt;
 (&amp;#039;/tmp&amp;#039; asDirectoryEntry ) nextNameFor: &amp;#039;stdout&amp;#039; extension: &amp;#039;txt&amp;#039;.        &amp;quot;=&amp;gt;  &amp;#039;stdout.001.txt&amp;#039; &amp;quot;&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Solution 2&amp;#039;&amp;#039;&amp;#039;. Use &amp;lt;code&amp;gt;#assureExistence&amp;lt;/code&amp;gt; on the &amp;lt;code&amp;gt;FileEntry&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;DirectoryEntry&amp;lt;/code&amp;gt;.&lt;br /&gt;
 &amp;#039;/tmp/stdout.001.txt&amp;#039; asFileEntry assureExistence.`&amp;quot;=&amp;gt;  /tmp/stdout.001.txt&amp;quot;&lt;/div&gt;</summary>
		<author><name>Nmingott</name></author>
	</entry>
</feed>