当前位置: 技术问答>linux和unix
linux c用什么函数创建文件夹啊?
来源: 互联网 发布时间:2016-10-06
本文导语: 请问在linux中用c函数怎么可以创建文件夹啊?我用mkdir("csdn/"), 文件夹是创建成功了,但是csdn这个文件夹好像没有读写的权限, 请问怎么弄可以创建一个具有读写和执行权限的文件夹啊? | int mkdir (...
请问在linux中用c函数怎么可以创建文件夹啊?我用mkdir("csdn/"), 文件夹是创建成功了,但是csdn这个文件夹好像没有读写的权限, 请问怎么弄可以创建一个具有读写和执行权限的文件夹啊?
|
int mkdir (const char *path, mode_t mode);
|
mkdir - create a directory
SYNOPSIS
#include
#include
int mkdir(const char *pathname, mode_t mode);
DESCRIPTION
mkdir() attempts to create a directory named pathname.
The argument mode specifies the permissions to use. It is modified by
the process's umask in the usual way: the permissions of the created
directory are (mode & ~umask & 0777).
SYNOPSIS
#include
#include
int mkdir(const char *pathname, mode_t mode);
DESCRIPTION
mkdir() attempts to create a directory named pathname.
The argument mode specifies the permissions to use. It is modified by
the process's umask in the usual way: the permissions of the created
directory are (mode & ~umask & 0777).