Revision of some help pages for module fileio.
[scilab.git] / scilab / modules / fileio / help / en_US / tempname.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--
3  * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
4  * Copyright (C) 2011 - DIGITEO - Allan CORNET
5  * 
6  * This file must be used under the terms of the CeCILL.
7  * This source file is licensed as described in the file COPYING, which
8  * you should have received as part of this distribution.  The terms
9  * are also available at    
10  * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
11  *
12  -->
13 <refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" version="5.0-subset Scilab" xml:lang="en" xml:id="tempname">
14     <refnamediv>
15         <refname>tempname</refname>
16         <refpurpose>unique name for temporary file</refpurpose>
17     </refnamediv>
18     <refsynopsisdiv>
19         <title>Calling Sequence</title>
20         <synopsis>tmp_name = tempname([prefix])</synopsis>
21     </refsynopsisdiv>
22     <refsection>
23         <title>Arguments</title>
24         <variablelist>
25             <varlistentry>
26                 <term>tmp_name</term>
27                 <listitem>
28                     <para>a string</para>
29                 </listitem>
30             </varlistentry>
31         </variablelist>
32         <variablelist>
33             <varlistentry>
34                 <term>prefix</term>
35                 <listitem>
36                     <para>
37                         a string: prefix of filename (On Windows, 3 characters maximum).
38                     </para>
39                 </listitem>
40             </varlistentry>
41         </variablelist>
42     </refsection>
43     <refsection>
44         <title>Description</title>
45         <para>
46             The <function>tempname</function> creates a file with a unique 
47             filename in the <varname>TMPDIR</varname> directory.
48         </para>
49         <para>
50             <code>tmp_name = tempname()</code> returns an unique string, 
51             <varname>tmp_name</varname>, suitable for use as a temporary filename.
52         </para>
53     </refsection>
54     <refsection>
55         <title>Examples</title>
56         <programlisting role="example"><![CDATA[
57       F1 = tempname()
58       isfile(F1)
59       F2 = tempname('TMP')
60       isfile(F2)
61  ]]></programlisting>
62     </refsection>
63     <refsection>
64         <title>History</title>
65         <revhistory>
66             <revision>
67                 <revnumber>5.4.0</revnumber>
68                 <revremark>Function tempname introduced.</revremark>
69             </revision>
70         </revhistory>
71     </refsection>
72 </refentry>