Function

Gio-2.0Giofile_new_tmpSince 2.32

  • Opens a file in the preferred directory for temporary files (as returned by g_get_tmp_dir()) and returns a Gio.File and Gio.FileIOStream 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 Gio.File constructors, this will return null if a temporary file could not be created.

    Parameters

    • tmpl: string

      Template for the file name, as in g_file_open_tmp(), or null for a default template

    Returns [Gio.File, Gio.FileIOStream]

    a new Gio.File. Free the returned object with g_object_unref().

    2.32