www.delorie.com/djgpp/doc/libc-2.01/libc_467.html   search  
Go to the first, previous, next, last section, table of contents.


mkstemp

Syntax

#include <stdio.h>

int mkstemp(char *template);

Description

template is a file specification that ends with six trailing X characters. This function replaces the XXXXXX with a set of characters such that the resulting file name names a nonexisting file. It then creates and opens the file.

Note that since MS-DOS is limited to eight characters for the file name, and since none of the X's get replaced by a dot, you can only have two additional characters before the X's.

Return Value

The open file descriptor.

Example

int fd = mkstemp("/tmp/ccXXXXXX");


Go to the first, previous, next, last section, table of contents.

  prev next   webmaster     delorie software   privacy  
  Copyright © 1997     Updated Apr 1997