Bazel client: implement PathExists on Windows Checking if a path exists is surprisingly hard on Windows. The most convenient API functions are PathFileExists and GetFileAttributes but neither of them follows junctions. To check if a junction is dangling, we have to resolve it all the way. This change adds a JunctionResolver class to file_windows, which can resolve junctions (if they aren't dangling) and non-junctions (in this case just checks their existence). See https://github.com/bazelbuild/bazel/issues/2107 See https://github.com/bazelbuild/bazel/issues/2181 -- PiperOrigin-RevId: 143645274 MOS_MIGRATED_REVID=143645274
diff --git a/src/main/cpp/util/file_platform.h b/src/main/cpp/util/file_platform.h index 5354052..b0458e8 100644 --- a/src/main/cpp/util/file_platform.h +++ b/src/main/cpp/util/file_platform.h
@@ -44,7 +44,7 @@ // Returns true on success. In case of failure sets errno. bool UnlinkPath(const std::string &file_path); -// Returns true if this path exists. +// Returns true if this path exists, following symlinks. bool PathExists(const std::string& path); // Returns the real, absolute path corresponding to `path`.