home *** CD-ROM | disk | FTP | other *** search
/ Aminet 18 / aminetcdnumber181997.iso / Aminet / misc / emu / AROSdev.lha / AROS / compiler / clib / creat.c < prev    next >
Encoding:
C/C++ Source or Header  |  1997-01-15  |  1.1 KB  |  54 lines

  1. /*
  2.     (C) 1995-96 AROS - The Amiga Replacement OS
  3.     $Id: creat.c,v 1.1 1997/01/15 17:48:49 digulla Exp $
  4.  
  5.     Desc: ANSI C function creat()
  6.     Lang: english
  7. */
  8.  
  9. /*****************************************************************************
  10.  
  11.     NAME */
  12. #include <unistd.h>
  13. #include <fcntl.h>
  14.  
  15.     int creat (
  16.  
  17. /*  SYNOPSIS */
  18.     const char * pathname,
  19.     int         mode)
  20.  
  21. /*  FUNCTION
  22.     Creates a file with the specified mode and name.
  23.  
  24.     INPUTS
  25.     pathname - Path and filename of the file you want to open.
  26.     mode - The access flags.
  27.  
  28.     RESULT
  29.     -1 for error or a file descriptor for use with write().
  30.  
  31.     NOTES
  32.     If the filesystem doesn't allow to specify different access modes
  33.     for users, groups and others, then the user modes are used.
  34.  
  35.     This is the same as open (pathname, O_CREAT|O_WRONLY|O_TRUNC, mode);
  36.  
  37.     EXAMPLE
  38.  
  39.     BUGS
  40.  
  41.     SEE ALSO
  42.     open(), close(), write(), fopen()
  43.  
  44.     INTERNALS
  45.  
  46.     HISTORY
  47.     15.01.97 digulla created
  48.  
  49. ******************************************************************************/
  50. {
  51.     return open (pathname, O_CREAT|O_WRONLY|O_TRUNC, mode);
  52. } /* creat */
  53.  
  54.