需要注意的是 windows下的_mkdir()只需要一个路径的参数,而linux下的mkdir()需要两个参数,第一个是路径,第二个是权限。以下是linux下的mkdir的讲解:
NAME
mkdir - make a directory
SYNOPSIS
#include <sys/stat.h>
int mkdir(const char *path, mode_t mode);
DESCRIPTION
The mkdir() function shall create a new directory with name path. The file permission bits of the new directory shall be initialized from mode. These file permission bits of the mode argument shall be modified by the process' file creation mask.
When bits in mode other than the file permission bits are set, the meaning of these additional bits is implementation-defined.
The directory's user ID shall be set to the process' effective user ID. The directory's group ID shall be set to the group ID of the parent directory or to the effective group ID of the process. Implementations shall provide a way to initialize the directory's group ID to the group ID of the parent directory. Implementations may, but need not, provide an implementation-defined way to initialize the directory's group ID to the effective group ID of the calling process.<