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.
fs::FileTypeshould document thatis_file(),is_dir(), andis_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 afs::FileTypewill share similar characteristics and perhaps claim that bothx.is_file()andx.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.