Add note on Windows path behaviour

This commit is contained in:
cyqsimon 2022-02-12 12:52:42 +08:00
parent 160faf1b30
commit f6f93fd7ba
No known key found for this signature in database
GPG Key ID: 1D8CE2F297390D65

View File

@ -1296,6 +1296,7 @@ pub fn and<U>(self, res: Result<U, E>) -> Result<U, E> {
/// ```
/// use std::{io::ErrorKind, path::Path};
///
/// // Note: on Windows "/" maps to "C:\"
/// let root_modified_time = Path::new("/").metadata().and_then(|md| md.modified());
/// assert!(root_modified_time.is_ok());
///