We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 93cbad6 commit ec63f9dCopy full SHA for ec63f9d
src/libstd/fs.rs
@@ -1033,6 +1033,12 @@ impl Metadata {
1033
/// [`is_dir`], and will be false for symlink metadata
1034
/// obtained from [`symlink_metadata`].
1035
///
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.
1041
+ ///
1042
/// [`is_dir`]: struct.Metadata.html#method.is_dir
1043
/// [`symlink_metadata`]: fn.symlink_metadata.html
1044
0 commit comments