reactos/rossubsys/posix/lib/psxdll/sys/stat/mkdir.c
Hermès Bélusca-Maïto 2ca9fcd3b0 Resuscitate POSIX subsystem from revision 21378.
svn path=/trunk/; revision=65460
2014-11-23 15:23:36 +00:00

34 lines
658 B
C

/* $Id: mkdir.c,v 1.3 2002/10/29 04:45:44 rex Exp $
*/
/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS POSIX+ Subsystem
* FILE: subsys/psx/lib/psxdll/sys/stat/mkdir.c
* PURPOSE: Make a directory
* PROGRAMMER: KJK::Hyperion <noog@libero.it>
* UPDATE HISTORY:
* 15/05/2002: Created
*/
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>
int mkdir(const char *path, mode_t mode)
{
int nFileNo;
switch((nFileNo = open(path, O_CREAT | O_EXCL | _O_DIRFILE, mode)))
{
case -1:
return (-1);
default:
close(nFileNo);
return (0);
}
}
/* EOF */