mkdir - make a directory
rmdir - remove a directory
#include <sys/types.h>
#include <unistd.h>
mkdir() makes a directory at the specified path. rmdir removes path. The path must include all device information. path is then the complete path to the directory. The file permission bits of the new directory shall be initialized from mode. These file permission bits of the mode argument shall be limited to the subset of allowable mode bits for the server. The mode bits for servers are as follow:
On success, mkdir() and rmdir() shall return 0. Otherwise, -1 shall be returned, no directory shall be created or removed and errno shall be set to indicate the error.
This function is a member of Unison's IOLIB family of functions. IOLIB is implemented as a message passing and generalized interface layer. Each Unison I/O server is responsible for its own error reporting.
For an exact list of error codes returned by a particular server, refer to that server's documentation in the Unison Programmer's Guide for each specific platform.
Servers may implement these errors codes in response to this function.
mkdir() and rmdir() fail and the file system remains unchanged if one or more of the following are true: