Opened 5 years ago
Last modified 5 years ago
#15774 new enhancement
Add ability to retrieve path of file descriptor
Reported by: | X512 | Owned by: | nobody |
---|---|---|---|
Priority: | normal | Milestone: | Unscheduled |
Component: | System/Kernel | Version: | R1/Development |
Keywords: | Cc: | ||
Blocked By: | Blocking: | ||
Platform: | All |
Description
This is hrev53917.
Currently there are no ability to retrieve path of file descriptor. _kern_entry_ref_to_path(dev, node, NULL, path, B_OS_NAME_LENGTH)
is only work for directories.
All major OS are support this feature:
- Windows:
GetFileInformationByHandleEx
withFileNameInfo
. - Linux: Path can be retrieved from
/proc/self/fd/<fd>
. - Mac OS X:
fcntl(fd, F_GETPATH, filePath)
.
Note:
See TracTickets
for help on using tickets.
my utility to inspect file descriptors: https://github.com/X547/HaikuUtils/tree/master/Handles.