On windows, we need to specify an extra flag if we are creating a symlink to a directory. To do this, we check if the provided destination is a directory using FileManager.fileExists(atPath:isDirectory:). However, the destination path is relative to the symlink and not relative to the current working directory like fileExists(atPath:) expects so we must first convert the relative path into an absolute path using the symlink path as a base.
On windows, we need to specify an extra flag if we are creating a symlink to a directory. To do this, we check if the provided destination is a directory using
FileManager.fileExists(atPath:isDirectory:)
. However, the destination path is relative to the symlink and not relative to the current working directory likefileExists(atPath:)
expects so we must first convert the relative path into an absolute path using the symlink path as a base.Resolves https://github.com/apple/swift-foundation/issues/928