@@ -1033,14 +1033,16 @@ impl Metadata {
10331033 /// [`is_dir`], and will be false for symlink metadata
10341034 /// obtained from [`symlink_metadata`].
10351035 ///
1036- /// This property means it is often more useful to use `!file_type.is_dir()`
1037- /// than `file_type.is_file()` when your goal is to read bytes from a
1038- /// source: the former includes symlink and pipes when the latter does not,
1039- /// meaning you will break workflows like `diff <( prog_a ) <( prog_b )` on
1040- /// a Unix-like system for example .
1036+ /// When the goal is simply to read from (or write to) the source, the most
1037+ /// reliable way to test the source can be read (or written to) is to open
1038+ /// it. Only using `is_file` can break workflows like `diff <( prog_a )` on
1039+ /// a Unix- like system for example. See [`File::open`] or
1040+ /// [`OpenOptions::open`] for more information .
10411041 ///
10421042 /// [`is_dir`]: struct.Metadata.html#method.is_dir
10431043 /// [`symlink_metadata`]: fn.symlink_metadata.html
1044+ /// [`File::open`]: struct.File.html#method.open
1045+ /// [`OpenOptions::open`]: struct.OpenOptions.html#method.open
10441046 ///
10451047 /// # Examples
10461048 ///
@@ -1313,14 +1315,16 @@ impl FileType {
13131315 /// [`is_dir`] and [`is_symlink`]; only zero or one of these
13141316 /// tests may pass.
13151317 ///
1316- /// This property means it is often more useful to use `!file_type.is_dir()`
1317- /// than `file_type.is_file()` when your goal is to read bytes from a
1318- /// source: the former includes symlink and pipes when the latter does not,
1319- /// meaning you will break workflows like `diff <( prog_a ) <( prog_b )` on
1320- /// a Unix-like system for example .
1318+ /// When the goal is simply to read from (or write to) the source, the most
1319+ /// reliable way to test the source can be read (or written to) is to open
1320+ /// it. Only using `is_file` can break workflows like `diff <( prog_a )` on
1321+ /// a Unix- like system for example. See [`File::open`] or
1322+ /// [`OpenOptions::open`] for more information .
13211323 ///
13221324 /// [`is_dir`]: struct.FileType.html#method.is_dir
13231325 /// [`is_symlink`]: struct.FileType.html#method.is_symlink
1326+ /// [`File::open`]: struct.File.html#method.open
1327+ /// [`OpenOptions::open`]: struct.OpenOptions.html#method.open
13241328 ///
13251329 /// # Examples
13261330 ///
0 commit comments