delorie.com/djgpp/doc/libc/libc_570.html   search  
libc.a reference

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

mkdir

Syntax

 
#include <sys/stat.h>

int mkdir(const char *path, mode_t mode);

Description

This function creates a subdirectory.

All the bits except S_IWUSR in the mode argument are ignored under MS-DOS. If S_IWUSR is not set in mode, the directory is created with read-only attribute bit set. Note that DOS itself ignores the read-only bit of directories, but some programs do not.

Return Value

Zero if the subdirectory was created, nonzero on failure.

Portability

ANSI/ISO C No
POSIX 1003.2-1992; 1003.1-2001

Example

 
mkdir("/usr/tmp", S_IWUSR);


  webmaster     delorie software   privacy  
  Copyright © 2004     Updated Apr 2004