This path is then passed to Windows file system APIs.This topic discusses the formats for file paths that you can use on Windows systems. I lack a good resource but I suspect wrapped method calls might partly eliminate the race condition: Though the validation cannot be performed without the race unless the class is designed for it. Do not operate on files in shared directoriesis a good indication of this. For example