| www.delorie.com/gnu/docs/glibc/libc_282.html | search |
![]() Buy the book! | |
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Directories are created with the mkdir function. (There is also
a shell command mkdir which does the same thing.)
mkdir function creates a new, empty directory with name
filename.
The argument mode specifies the file permissions for the new directory file. See section 14.9.5 The Mode Bits for Access Permission, for more information about this.
A return value of 0 indicates successful completion, and
-1 indicates failure. In addition to the usual file name syntax
errors (see section 11.2.3 File Name Errors), the following errno error
conditions are defined for this function:
EACCES
EEXIST
EMLINK
Well-designed file systems never report this error, because they permit more links than your disk could possibly hold. However, you must still take account of the possibility of this error, as it could result from network access to a file system on another machine.
ENOSPC
EROFS
To use this function, your program should include the header file `sys/stat.h'.
| webmaster donations bookstore | delorie software privacy |
| Copyright © 2003 by The Free Software Foundation | Updated Jun 2003 |