mktemp


Description:

[ Version ( since = "1.19.53" ) ]
public string mktemp (string tmpl, Mktemp? optargs) throws Error

create a temporary file

This command creates a temporary file. The tmpl parameter should be a full pathname for the temporary directory name with the final six characters being "XXXXXX".

For example: "/tmp/myprogXXXXXX" or "/Temp/myprogXXXXXX", the second one being suitable for Windows filesystems.

The name of the temporary file that was created is returned.

The temporary file is created with mode 0600 and is owned by root.

The caller is responsible for deleting the temporary file after use.

If the optional suffix parameter is given, then the suffix (eg. ".txt") is appended to the temporary name.

See also: mkdtemp.

Parameters:

this

A GuestfsSession object

optargs

a GuestfsMktemp containing optional arguments

Returns:

the returned string, or NULL on error




2022 vala-language.org