关于linux下的mkdir函数
来源:互联网 发布:2013年最火的网络歌曲 编辑:程序博客网 时间:2024/04/30 18:09
原型:int mkdir (const char *filename, mode_t mode)
返回0表示成功,返回-1表述出错。使用该函数需要包含头文件sys/stat.h
mode 表示新目录的权限,可以取以下值:
S_IRUSR
S_IREAD
Read permission bit for the owner of the file. On many systems this bit is 0400. S_IREAD is an obsolete synonym provided for BSD compatibility.
S_IWUSR
S_IWRITE
Write permission bit for the owner of the file. Usually 0200. S_IWRITE is an obsolete synonym provided for BSD compatibility.
S_IXUSR
S_IEXEC
Execute (for ordinary files) or search (for directories) permission bit for the owner of the file. Usually 0100. S_IEXEC is an obsolete synonym provided for BSD compatibility.
S_IRWXU
This is equivalent to (S_IRUSR | S_IWUSR | S_IXUSR).
S_IRGRP
Read permission bit for the group owner of the file. Usually 040.
S_IWGRP
Write permission bit for the group owner of the file. Usually 020.
S_IXGRP
Execute or search permission bit for the group owner of the file. Usually 010.
S_IRWXG
This is equivalent to (S_IRGRP | S_IWGRP | S_IXGRP).
S_IROTH
Read permission bit for other users. Usually 04.
S_IWOTH
Write permission bit for other users. Usually 02.
S_IXOTH
Execute or search permission bit for other users. Usually 01.
S_IRWXO
This is equivalent to (S_IROTH | S_IWOTH | S_IXOTH).
S_ISUID
This is the set-user-ID on execute bit, usually 04000. See How Change Persona.
S_ISGID
This is the set-group-ID on execute bit, usually 02000. See How Change Persona.
S_ISVTX
This is the sticky bit, usually 01000.
返回0表示成功,返回-1表述出错。使用该函数需要包含头文件sys/stat.h
mode 表示新目录的权限,可以取以下值:
S_IRUSR
S_IREAD
Read permission bit for the owner of the file. On many systems this bit is 0400. S_IREAD is an obsolete synonym provided for BSD compatibility.
S_IWUSR
S_IWRITE
Write permission bit for the owner of the file. Usually 0200. S_IWRITE is an obsolete synonym provided for BSD compatibility.
S_IXUSR
S_IEXEC
Execute (for ordinary files) or search (for directories) permission bit for the owner of the file. Usually 0100. S_IEXEC is an obsolete synonym provided for BSD compatibility.
S_IRWXU
This is equivalent to (S_IRUSR | S_IWUSR | S_IXUSR).
S_IRGRP
Read permission bit for the group owner of the file. Usually 040.
S_IWGRP
Write permission bit for the group owner of the file. Usually 020.
S_IXGRP
Execute or search permission bit for the group owner of the file. Usually 010.
S_IRWXG
This is equivalent to (S_IRGRP | S_IWGRP | S_IXGRP).
S_IROTH
Read permission bit for other users. Usually 04.
S_IWOTH
Write permission bit for other users. Usually 02.
S_IXOTH
Execute or search permission bit for other users. Usually 01.
S_IRWXO
This is equivalent to (S_IROTH | S_IWOTH | S_IXOTH).
S_ISUID
This is the set-user-ID on execute bit, usually 04000. See How Change Persona.
S_ISGID
This is the set-group-ID on execute bit, usually 02000. See How Change Persona.
S_ISVTX
This is the sticky bit, usually 01000.
- 关于linux下的mkdir函数
- 关于linux下的mkdir函数
- linux下的mkdir函数
- Linux下的mkdir函数
- Linux 下的 mkdir 函数
- Linux下mkdir函数
- linux下mkdir -v mkdir -p下的经验
- linux和window下mkdir函数问题
- linux和window下mkdir函数问题
- linux下mkdir函数和windows下_mkdir函数的区别
- Linux下的mkdir&&rmdir指令
- linux下C语言中的mkdir函数与rmdir函数
- linux api 函数---mkdir
- mkdir函数-linux
- mkdir函数-linux
- linux mkdir函数使用
- linux下C语言中mkdir和rmdir函数
- Linux下C语言中mkdir和rmdir函数
- 经典书籍
- div+css实现圆角边框
- T-SQL常用关键字和语法
- 在事件中引用aspx页面repeater控件所包含控件的数据
- 在上下九拍到的(CS03的兄弟姐妹们注意了)
- 关于linux下的mkdir函数
- VS2005(VC8) 使用 Boost
- equals重写的例子
- 用devcpp配置控制台编译的gcc、g++环境
- 基于ARM9的视频采集传输系统
- 使用OTL调用Oracle的存储函数
- 使用devcpp(mingw)编译产生JNI中的dll
- VHDL 根本就不是语言
- VS2005(VC8)编译、配置Boost.regex