-
Notifications
You must be signed in to change notification settings - Fork 13k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
File does not implement Debug #24570
Comments
We can easily slap one on that just prints the file descriptor/HANDLE, but it would ideally include the path of the open file. It looks like it'll be a bit of a pain to get. Windows can get it via either OSX can grab it by passing Looks like Linux may have to poke around in |
It'd also be nice to print if the file's writable or read only. |
On Linux, you can read the link at That shouldn't be too hard, given that we have a |
I'm working on this. |
Relying on procfs is bad, because it might not be mounted or be mounted at a non-standard location. |
@nagisa We aren't really relying on it here. If |
This patch adds a `Debug` impl for `std::fs::File`. On all platforms (Unix and Windows) it shows the file descriptor. On Linux, it displays the path and access mode as well. Ideally we should show the path/mode for all platforms, not just Linux, but this will do for now. cc #24570
Currently the If anyone wants to flesh out the Windows or OS X or BSD code, then feel free. |
prints
|
There is a FIXME related to this issue, |
All types should, but it doesn't:
The text was updated successfully, but these errors were encountered: