提交 d0178b4f 编写于 作者: D Dan Gohman

Make it platform-specific whether `hard_link` follows symlinks.

Also mention that where possible, `hard_link` does not follow symlinks.
上级 ce00b3e2
...@@ -1701,8 +1701,9 @@ pub fn copy<P: AsRef<Path>, Q: AsRef<Path>>(from: P, to: Q) -> io::Result<u64> { ...@@ -1701,8 +1701,9 @@ pub fn copy<P: AsRef<Path>, Q: AsRef<Path>>(from: P, to: Q) -> io::Result<u64> {
/// The `dst` path will be a link pointing to the `src` path. Note that systems /// The `dst` path will be a link pointing to the `src` path. Note that systems
/// often require these two paths to both be located on the same filesystem. /// often require these two paths to both be located on the same filesystem.
/// ///
/// If `src` names a symbolic link, it is not followed. The created hard link /// If `src` names a symbolic link, it is platform-specific whether the symbolic
/// points to the symbolic link itself. /// link is followed. On platforms where it's possible to not follow it, it is
/// not followed, and the created hard link points to the symbolic link itself.
/// ///
/// # Platform-specific behavior /// # Platform-specific behavior
/// ///
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册