File.newTmp

Opens a file in the preferred directory for temporary files (as returned by glib.global.getTmpDir) and returns a #GFile and #GFileIOStream pointing to it.

tmpl should be a string in the GLib file name encoding containing a sequence of six 'X' characters, and containing no directory components. If it is null, a default template is used.

Unlike the other #GFile constructors, this will return null if a temporary file could not be created.

interface File
static
newTmp

Parameters

tmpl string

Template for the file name, as in glib.global.fileOpenTmp, or null for a default template

iostream gio.file_iostream.FileIOStream

on return, a #GFileIOStream for the created file

Return Value

Type: gio.file.File

a new #GFile. Free the returned object with gobject.object.ObjectG.unref.