mkdir(a) creates a directory. The parent directory must exist. If the directory already exists or any other error occurs an exception is raised. The directory is created with the standard permissions for directories. If umask is set to the standard value for directories, the directory will get the permission 0755, i.e. read/write/execute for the owner und read/execute for the group and all others.
mkdir(string, int) creates a directory with special permissions. Note that the umask is always applied. A standard umask setting will always remove the write permission for the group and the others. Use chmod afterwards if you want less restrictive permissions. The permissions are usually given in octal notation, for example mkdir("test.file", 0640). The leading zero is always necessary. Add up 1 for execution, 2 for write and 4 for read permission.
