xref: /original-bsd/lib/libc/compat-43/creat.2 (revision c3e32dec)
1.\" Copyright (c) 1989, 1990, 1993
2.\"	The Regents of the University of California.  All rights reserved.
3.\"
4.\" %sccs.include.redist.man%
5.\"
6.\"     @(#)creat.2	8.1 (Berkeley) 06/02/93
7.\"
8.Dd
9.Dt CREAT 2
10.Os BSD 4
11.Sh NAME
12.Nm creat
13.Nd create a new file
14.Sh SYNOPSIS
15.Fd #include <fcntl.h>
16.Ft int
17.Fn creat "char *path" "mode_t mode"
18.Sh DESCRIPTION
19.Bf -symbolic
20This interface is made obsolete by:
21.Ef
22.Xr open 2 .
23.Pp
24.Fn Creat
25is the same as:
26.Bd -literal -offset indent
27open(path, O_CREAT | O_TRUNC | O_WRONLY, mode);
28.Ed
29.Sh SEE ALSO
30.Xr open 2
31.Sh HISTORY
32The
33.Nm
34function call appeared in Version 6 AT&T UNIX.
35