3 回答
TA贡献1998条经验 获得超6个赞
/proc
F_GETPATH
fcntl
:
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}
MAXPATHLEN
PATH_MAX
TA贡献2003条经验 获得超2个赞
struct stat
struct dirent
struct stat
- 3 回答
- 0 关注
- 803 浏览
添加回答
举报