Mono Class Library: Mono.Unix.Native.Stdlib Overview | Members

Mono.Unix.Native.Stdlib.tmpfile Method

Create a temporary file. [Edit]

public static IntPtr tmpfile ()

Returns

The tmpfile() function returns a pointer to an open file stream on success, and IntPtr.Zero on error. [Edit]

Remarks

The tmpfile() function returns a pointer to a stream associated with a file descriptor returned by the routine Syscall.mkstemp(3). The created file is unlinked before tmpfile() returns, causing the file to be automatically deleted when the last reference to it is closed. The file is opened with the access value 'w+'. The file is created in the directory determined by the environment variable TMPDIR if set. The default location if TMPDIR is not set is /tmp.

[Edit]

Requirements

Namespace: Mono.Unix.Native
Assembly: Mono.Posix (in Mono.Posix.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0