muimaster.library: support Listview_List in List
[AROS.git] / compiler / posixc / creat.c
blob124fbd857cd0607ba8cc1598415ff0611df4995d
1 /*
2 Copyright © 1995-2013, The AROS Development Team. All rights reserved.
3 $Id$
5 POSIX.1-2008 function creat().
6 */
8 /*****************************************************************************
10 NAME */
11 #include <fcntl.h>
13 int creat (
15 /* SYNOPSIS */
16 const char * pathname,
17 int mode)
19 /* FUNCTION
20 Creates a file with the specified mode and name.
22 INPUTS
23 pathname - Path and filename of the file you want to open.
24 mode - The access flags.
26 RESULT
27 -1 for error or a file descriptor for use with write().
29 NOTES
30 If the filesystem doesn't allow to specify different access modes
31 for users, groups and others, then the user modes are used.
33 This is the same as open (pathname, O_CREAT|O_WRONLY|O_TRUNC, mode);
35 This function must not be used in a shared library or
36 in a threaded application.
38 EXAMPLE
40 BUGS
42 SEE ALSO
43 open(), close(), write(), fopen()
45 INTERNALS
47 ******************************************************************************/
49 return open (pathname, O_CREAT|O_WRONLY|O_TRUNC, mode);
50 } /* creat */