S_ISREG等几个常见的宏

S_ISLNK(st_mode):是否是一个连接.
S_ISREG是否是一个常规文件.
S_ISDIR是否是一个目录S_ISCHR是否是一个字符设 备.
S_ISBLK是否是一个块设备
S_ISFIFO是否 是一个FIFO文件.

S_ISSOCK是否是一个SOCKET文件

参考网址:http://blog.sina.com.cn/s/blog_6e1b60990100ockn.html

S_IRUSR
  Permits the file's owner to read it.
S_IWUSR
  Permits the file's owner to write to it.
S_IRGRP
  Permits the file's group to read it.
S_IWGRP
  Permits the file's group to write to it.

你可能感兴趣的:(S_ISREG等几个常见的宏)