return a filename that may be used for a temporary file
return a filepath that may be used for a temporary file
(optional) string prefix for the temporary name
(optional) string suffix for the temporary name
(optional) option of the form directory=s as described below
directory=string or one of bindir, datadir, homedir, mapledir, tempdir, toolboxdir, worksheetdir.
The directory option specifies the directory in which the temporary file should be generated. The default value, tempdir, indicates that the directory returned by FileTools[TemporaryDirectory] should be used.
For the meaning of bindir, datadir, homedir, mapledir, or toolboxdir, see kernelopts. For the meaning of worksheetdir, see interface.
The TemporaryFilename function returns a string that can be used as the name of a temporary file. The returned filename is of the form MapleXXXXXX, where each X is replaced with a random character.
The TemporaryFile function performs a similar task but uses a temporary directory as its default destination.
If the optional prefix is provided, then the generated filename will be of the form prefixXXXXXX.
If both a prefix and suffix are provided, then the generated filename will be of the form prefixXXXXXXsuffix. A prefix must be provided if a suffix is to be specified.
Each of the functions TemporaryFilename and TemporaryFile guarantees that the filename it returns did not exist at the time it was called. However, it is possible that another process may create this filename in between the call to TemporaryFilename or TemporaryFile and the moment when the file is actually opened.
While TemporaryFilename and TemporaryFile do not create the temporary file, they do issue an error if this file could not be created.
Return a filename that is unique in the current directory.
Return a unique filename with extension .txt, in the temporary directory.
Return a unique filename with extension .csv, in the home directory of the current user.
Attempt to create a temporary filename in a non-writable directory.
Error, permission denied
The FileTools[TemporaryFile] command was introduced in Maple 2017.
For more information on Maple 2017 changes, see Updates in Maple 2017.
Download Help Document
What kind of issue would you like to report? (Optional)