Stabilize Windows FileTypeExt with is_symlink_dir and is_symlink_file#98583
Conversation
…_file` These calls allow detecting whether a symlink is a file or a directory, a distinction Windows maintains, and one important to software that wants to do further operations on the symlink (e.g. removing it).
|
Hey! It looks like you've submitted a new PR for the library teams! If this PR contains changes to any Examples of
|
|
r? @thomcc (rust-highfive has picked a reviewer for you, use r? to override) |
|
These methods didn't have a tracking issue. |
thomcc
left a comment
There was a problem hiding this comment.
Impl looks fine, r=me once fcp happens
00a2e05 to
a4cb0b9
Compare
|
I would definitely love this to be stable. This is not necessarily a problem but I thought it might be worth pointing out the difference between stdlib semantics and Windows semantics here. For example, if you want to know if a file is some kind of directory then you'd do: file.is_dir() || file.is_symlink_dir()Which ends up roughly translating to: file.is_directory() && (!file.is_symlink() || file.is_symlink())Presumably this is optimized to |
|
@ChrisDenton That seems reasonable. I think we'd get much more confusing results if |
|
@rfcbot merge |
|
Team member @joshtriplett has proposed to merge this. The next step is review by the rest of the tagged team members: No concerns currently listed. Once a majority of reviewers approve (and at most 2 approvals are outstanding), this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up! See this document for info about what commands tagged team members can give me. |
|
🔔 This is now entering its final comment period, as per the review above. 🔔 |
|
The final comment period, with a disposition to merge, as per the review above, is now complete. As the automated representative of the governance process, I would like to thank the author for their work and everyone else who contributed. This will be merged soon. |
|
@bors r=thomcc |
Rollup of 8 pull requests Successful merges: - rust-lang#98583 (Stabilize Windows `FileTypeExt` with `is_symlink_dir` and `is_symlink_file`) - rust-lang#99698 (Prefer visibility map parents that are not `doc(hidden)` first) - rust-lang#99700 (Add a clickable link to the layout section) - rust-lang#99712 (passes: port more of `check_attr` module) - rust-lang#99759 (Remove dead code from cg_llvm) - rust-lang#99765 (Don't build std for *-uefi targets) - rust-lang#99771 (Update pulldown-cmark version to 0.9.2 (fixes url encoding for some chars)) - rust-lang#99775 (rustdoc: do not allocate String when writing path full name) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
These calls allow detecting whether a symlink is a file or a directory,
a distinction Windows maintains, and one important to software that
wants to do further operations on the symlink (e.g. removing it).