1 post found
URL.path() returns a percent-encoded path by default, so FileManager.fileExists(atPath:) returns false for any file with a space or an accent in its name. Here's why path() and the old path property disagree, how it silently creates duplicate files, and how to fix file URL handling in Swift for good.