Skip to content

Commit 5022c06

Browse files
Update docs for fs::hard_link
1 parent dc38d87 commit 5022c06

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

library/std/src/fs.rs

+5-2
Original file line numberDiff line numberDiff line change
@@ -1736,8 +1736,11 @@ pub fn copy<P: AsRef<Path>, Q: AsRef<Path>>(from: P, to: Q) -> io::Result<u64> {
17361736
///
17371737
/// # Platform-specific behavior
17381738
///
1739-
/// This function currently corresponds to the `linkat` function with no flags
1740-
/// on Unix and the `CreateHardLink` function on Windows.
1739+
/// This function currently corresponds the `CreateHardLink` function on Windows.
1740+
/// On most Unix systems, it corresponds to the `linkat` function with no flags.
1741+
/// On Android, VxWorks, and Redox, it instead corresponds to the `link` function.
1742+
/// On MacOS, it uses the `linkat` function if it is available, but on very old
1743+
/// systems where `linkat` is not available, `link` is selected at runtime instead.
17411744
/// Note that, this [may change in the future][changes].
17421745
///
17431746
/// [changes]: io#platform-specific-behavior

0 commit comments

Comments
 (0)