-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
A-docsArea: Documentation for any part of the project, including the compiler, standard library, and toolsArea: Documentation for any part of the project, including the compiler, standard library, and toolsC-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
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.
Metadata
Metadata
Assignees
Labels
A-docsArea: Documentation for any part of the project, including the compiler, standard library, and toolsArea: Documentation for any part of the project, including the compiler, standard library, and toolsC-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.