Skip to content

Commit 34cbdb8

Browse files
Update docs for fs::hard_link
1 parent 3bfc899 commit 34cbdb8

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

library/std/src/fs.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1711,8 +1711,11 @@ pub fn copy<P: AsRef<Path>, Q: AsRef<Path>>(from: P, to: Q) -> io::Result<u64> {
17111711
///
17121712
/// # Platform-specific behavior
17131713
///
1714-
/// This function currently corresponds to the `linkat` function with no flags
1715-
/// on Unix and the `CreateHardLink` function on Windows.
1714+
/// This function currently corresponds the `CreateHardLink` function on Windows.
1715+
/// On most Unix systems, it corresponds to the `linkat` function with no flags.
1716+
/// On Android, VxWorks, and Redox, it instead corresponds to the `link` function.
1717+
/// On MacOS, it uses the `linkat` function if it is available, but on very old
1718+
/// systems where `linkat` is not available, `link` is selected at runtime instead.
17161719
/// Note that, this [may change in the future][changes].
17171720
///
17181721
/// [changes]: io#platform-specific-behavior

0 commit comments

Comments
 (0)