RTEMS Logo

RTEMS 4.7.99.2 On-Line Library


Files and Directories Manager mkdir - Makes a directory

PREV UP NEXT Bookshelf RTEMS POSIX API User's Guide

4.4.16: mkdir - Makes a directory

CALLING SEQUENCE:

#include <sys/types.h>
#include <sys/stat.h>

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

STATUS CODES:

EACCES
Search permission is denied for a directory in a file's path prefix
EEXIST
The name file already exist.
EMLINK
The number of links would exceed LINK_MAX
ENAMETOOLONG
Length of a filename string exceeds PATH_MAX and _POSIX_NO_TRUNC is in effect.
ENOENT
A file or directory does not exist.
ENOSPC
No space left on disk.
ENOTDIR
A component of the specified pathname was not a directory when a directory was expected.
EROFS
Read-only file system.

DESCRIPTION:

The mkdir() function creates a new diectory named path. The permission bits (modified by the file creation mask) are set from mode. The owner and group IDs for the directory are set from the effective user ID and group ID.

The new directory may (or may not) contain entries for.. and .. but is otherwise empty.

NOTES:

NONE


PREV UP NEXT Bookshelf RTEMS POSIX API User's Guide

Copyright © 1988-2004 OAR Corporation