This PR implements symlink detection for Windows, since GCC doesn’t support symlinks on Windows. This is used by the wallet’s ListDatabases in order to detect symlinks and avoid recursing them. It’s also used in wallet path validation since that is also checking whether paths are symlinks, and we should properly detect symlinks on Windows.
Under the hood, the IsSymlink function uses std::filesystem::is_symlink for non-Windows systems. On Windows, it checks a file’s attributes to determine if it is a reparse point. Strictly speaking, this will also catch files that aren’t symlinks, such as directories that are Onedrive mounts. I think it’s fine to not be recursively searching such directories.
This is based on #34418 for the multiwallet test and CI changes that it enables. The last commit also removes the skipping of the symlink checks so that we are testing that the symlink handling behavior on Windows matches that on Linux and MacOS.