Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Watcom C Library Reference - <u>synopsis:</u> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
Synopsis:
    #include <sys\types.h>
    #include <direct.h>
    int mkdir( const char *path );
    int _mkdir( const char *path );
    int _wmkdir( const wchar_t *path );

Description:
    The mkdir function creates a new subdirectory with name path.  The path
    can be either relative to the current working directory or it can be an
    absolute path name.

    The _mkdir function is identical to mkdir.  Use _mkdir for ANSI/ISO
    naming conventions.

    The _wmkdir function is identical to mkdir except that it accepts a
    wide-character string argument.

Returns:
    The mkdir function returns zero if successful, and a non-zero value
    otherwise.

Errors:
    When an error has occurred,  errno contains a value indicating the type
    of error that has been detected.

    Constant     Meaning

EACCES
    Search permission is denied for a component of path or write permission
    is denied on the parent directory of the directory to be created.

ENOENT
    The specified path does not exist or path is an empty string.


Example:
    To make a new directory called \watcom on drive C:

    #include <sys\types.h>
    #include <direct.h>

    void main()
      {
        mkdir( "c:\\watcom" );
      }

    Note the use of two adjacent backslash characters (\) within
    character-string constants to signify a single backslash.

Classification:
    mkdir is POSIX 1003.1, _mkdir is not POSIX, _wmkdir is not POSIX

_mkdir conforms to ANSI/ISO naming conventions

Systems:
     mkdir - All, Netware

    _mkdir - DOS, Windows, Win386, Win32, OS/2 1.x(all), OS/2-32
    _wmkdir - DOS, Windows, Win386, Win32, OS/2 1.x(all), OS/2-32

See Also:
    chdir, chmod, getcwd, rmdir, stat, umask

See Also: umask

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson