mkpath_np man page on Darwin

Man page or keyword search:  
man Server   23457 pages
apropos Keyword Search (all sections)
Output format
Darwin logo
[printable version]

mkpath_np(3)		 BSD Library Functions Manual		  mkpath_np(3)

NAME
     mkpath_np — Auxiliary routine for efficiently creating paths

SYNOPSIS
     #include <unistd.h>

     int
     mkpath_np(const char * path, mode_t omode);

DESCRIPTION
     This routine allows the caller to create a path, including intermediate
     directories.  It is equivalent to calling mkdir(1) with the -p command
     line argument.

     Intermediate directories are created with permission bits of rwxrwxrwx
     (0777) as modified by the current umask, plus write and search permission
     for the owner.

     The leaf directory is created with permission bits of omode as modified
     by the current umask.

RETURN VALUES
     A 0 return value indicates success.  If an error occurs, the return value
     is a non-zero error code.	Note that EEXIST is returned iff the leaf
     directory already exists and is a directory, so under certain circum‐
     stances, this error value may not indicate a failure state.

     This routine does NOT modify errno.

ERRORS
     Any error code that can be returned by mkdir(2) can be returned by
     mkpath_np(), but mkpath_np() will return the error code rather than set‐
     ting errno.

     [ENOTDIR]		A component of the path is not a directory (in con‐
			trast to mkdir(2) which returns this based on the path
			prefix rather than the path).

     [EEXIST]		The path already exists and is a directory.

HISTORY
     This function first appeared in iOS 5.0.

SEE ALSO
     mkdir(1), chmod(2), mkdir(2)

Mac OS X			 July 13, 2011			      Mac OS X
[top]

List of man pages available for Darwin

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net