Closed
Description
fs::FileType
should document that is_file()
, is_dir()
, and is_symlink()
are all mutually exclusive. (and that it may also be the case that none of them are true)
Why? Because Path::is_file()
returns true for both files and symlinks to files, and this tends to make me paranoid that a fs::FileType
will share similar characteristics and perhaps claim that both x.is_file()
and x.is_symlink()
. The only way to convince myself that FileType's behavior is indeed sane is to write a little test program---again.
Surely I can't be alone in this.