03文件属性
一、获取文件属性
1 | int stat(const char *path, struct stat *buf); |
1.1属性结构体的如下
1 | struct stat |
1.2文件类型和权限
1.3判断文件权限
1 | // 文件权限(st_mode最低的9个bit位就是文件权限) |
All articles in this blog are licensed under CC BY-NC-SA 4.0 unless stating additionally.
1 | int stat(const char *path, struct stat *buf); |
1 | struct stat |
1 | // 文件权限(st_mode最低的9个bit位就是文件权限) |