home *** CD-ROM | disk | FTP | other *** search
/ The Atari Compendium / The Atari Compendium (Toad Computers) (1994).iso / files / prgtools / mint / mntdoc01.zoo / mintdoc / cat3 / tmpnam.3 < prev    next >
Encoding:
Text File  |  1993-03-03  |  1.8 KB  |  67 lines

  1.  
  2.  
  3.  
  4. TMPNAM(3)           MINTLIB LIBRARY FUNCTIONS           TMPNAM(3)
  5.  
  6.  
  7. N✓NA✓AM✓ME✓E
  8.        tmpnam - create a name for a temporary file
  9.  
  10. S✓SY✓YN✓NO✓OP✓PS✓SI✓IS✓S
  11.        #include <stdio.h>
  12.  
  13.        char *tmpnam(char *buf);
  14.  
  15. D✓DE✓ES✓SC✓CR✓RI✓IP✓PT✓TI✓IO✓ON✓N
  16.        This  function  generates  a  file name that can safely be
  17.        used for a temporary file.
  18.  
  19.        tmpnam always tries to generate a file name in a directory
  20.        meant  for  temporary  files; it tries to determine such a
  21.        directory by  checking  the  environment  variables  TEMP,
  22.        TMPDIR,  TMP  and  TEMPDIR,  successively;  if this search
  23.        fails, the current directory is used.
  24.  
  25.        If buf is NULL, tmpnam leaves its result  in  an  internal
  26.        static  area  and returns a pointer to that area. The next
  27.        call to tmpnam will destroy the contents of the  area.  If
  28.        buf  is  not  NULL,  it is assumed to be the address of an
  29.        buffer area; tmpnam places its result in that  buffer  and
  30.        returns buf.
  31.  
  32. S✓SE✓EE✓E A✓AL✓LS✓SO✓O
  33.        c✓cr✓re✓ea✓at✓t(✓(3✓3)✓),✓, f✓fo✓op✓pe✓en✓n(✓(3✓3)✓),✓, m✓mk✓kt✓te✓em✓mp✓p(✓(3✓3)✓),✓, t✓tm✓mp✓pf✓fi✓il✓le✓e(✓(3✓3)✓),✓, u✓un✓nl✓li✓in✓nk✓k(✓(3✓3)✓)
  34.  
  35. N✓NO✓OT✓TE✓ES✓S
  36.        The  related UN*X function tempnam is currently not avail-
  37.        able in the mintlibs.
  38.  
  39.        This function generates a different file name each time it
  40.        is called.
  41.  
  42.        Files  created  using  this  function  and either fopen or
  43.        creat are temporarily only in the sense that  they  reside
  44.        in  a directory intended for temporary use, and their file
  45.        names are unique. It is the user's responsibility  to  use
  46.        unlink to remove the file when its use is ended.
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64. MiNT docs 0.1              3 March 1993                         1
  65.  
  66.  
  67.