3 回答

TA贡献1795条经验 获得超7个赞
/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贡献1826条经验 获得超6个赞
struct stat
struct dirent
struct stat
- 3 回答
- 0 关注
- 469 浏览
添加回答
举报