Added the note to Metadata too
This commit is contained in:
parent
93cbad6ed5
commit
ec63f9d99b
1 changed files with 6 additions and 0 deletions
|
@ -1033,6 +1033,12 @@ impl Metadata {
|
||||||
/// [`is_dir`], and will be false for symlink metadata
|
/// [`is_dir`], and will be false for symlink metadata
|
||||||
/// obtained from [`symlink_metadata`].
|
/// obtained from [`symlink_metadata`].
|
||||||
///
|
///
|
||||||
|
/// This property means it is often more useful to use `!file_type.is_dir()`
|
||||||
|
/// than `file_type.is_file()` when your goal is to read bytes from a
|
||||||
|
/// source: the former includes symlink and pipes when the latter does not,
|
||||||
|
/// meaning you will break workflows like `diff <( prog_a ) <( prog_b )` on
|
||||||
|
/// a Unix-like system for example.
|
||||||
|
///
|
||||||
/// [`is_dir`]: struct.Metadata.html#method.is_dir
|
/// [`is_dir`]: struct.Metadata.html#method.is_dir
|
||||||
/// [`symlink_metadata`]: fn.symlink_metadata.html
|
/// [`symlink_metadata`]: fn.symlink_metadata.html
|
||||||
///
|
///
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue