Skip to content

Commit 9d7eda9

Browse files
committed
Mention that fs::canonicalize makes paths absolute.
1 parent 8ff4b42 commit 9d7eda9

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/libstd/fs.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1699,8 +1699,8 @@ pub fn read_link<P: AsRef<Path>>(path: P) -> io::Result<PathBuf> {
16991699
fs_imp::readlink(path.as_ref())
17001700
}
17011701

1702-
/// Returns the canonical form of a path with all intermediate components
1703-
/// normalized and symbolic links resolved.
1702+
/// Returns the canonical, absolute form of a path with all intermediate
1703+
/// components normalized and symbolic links resolved.
17041704
///
17051705
/// # Platform-specific behavior
17061706
///

src/libstd/path.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -2284,8 +2284,8 @@ impl Path {
22842284
fs::symlink_metadata(self)
22852285
}
22862286

2287-
/// Returns the canonical form of the path with all intermediate components
2288-
/// normalized and symbolic links resolved.
2287+
/// Returns the canonical, absolute form of the path with all intermediate
2288+
/// components normalized and symbolic links resolved.
22892289
///
22902290
/// This is an alias to [`fs::canonicalize`].
22912291
///

0 commit comments

Comments
 (0)