Clarify that `fs::copy` dereferences symlinks instead of copying the link itself
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 119k
- Forks
- 16.1k
- PR merge metrics
- PR metrics pending
Description
Location
std::fs::copy
Summary
fs::copy, when being called with a symlink as from, does not copy the symlink itself but dereferences it and copies the file behind the symlink. The Rust docs do not really mention this, even if it discoverable that this is the behaviour as the docs mentions not being able to copy symlinks to directories. I think explicitly mentioning this, however, would be a nice addition.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the documentation for std::fs::copy and read the existing description of symlink handling, including the note about symlinks to directories. Clarify that a symlink supplied as the source is dereferenced and its target is copied, then confirm the documentation accurately describes the existing behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 78/100