3 回答
TA贡献1998条经验 获得超6个赞
/proc
F_GETPATHfcntl:
F_GETPATH Get the path of the file descriptor Fildes. The argu- ment must be a buffer of size MAXPATHLEN or greater.
#include <sys/syslimits.h>#include <fcntl.h>char filePath[PATH_MAX];if (fcntl(fd, F_GETPATH, filePath) != -1){
// do something with the file path}MAXPATHLENPATH_MAX
TA贡献2003条经验 获得超2个赞
struct stat
struct direntstruct stat
- 3 回答
- 0 关注
- 864 浏览
添加回答
举报
