Windows implementation of feature path_try_exists by ChrisDenton · Pull Request #85060 · rust-lang/rust (original) (raw)

Draft of a Windows implementation of try_exists (#83186).

The first commit reorganizes the code so I would be interested to get some feedback on if this is a good idea or not. It moves the Path::try_exists function to fs::exists. leaving the former as a wrapper for the latter. This makes it easier to provide platform specific implementations and matches the fs::metadata function.

The other commit implements a Windows specific variant of exists. I'm still figuring out my approach so this is very much a first draft. Eventually this will need some more eyes from knowledgable Windows people.