Closed DevyV closed 4 years ago
Wrap it in a do-catch.
https://docs.swift.org/swift-book/LanguageGuide/ErrorHandling.html
Yes, I figured it myself after 2 hours of searching for a solution.
As a new-to-swift guy, it was also quite frustrating to get errors in Xcode me when trying to deal with your samples, since a simple copy+paste should work for examples I believe.
So why do not you publish sample code that work just out-of-the box? May that help far too much for readers like new swift learners?
Hello,
As a new to Swift developer, I found your great code when trying to manipulate files!
With my Swift knowledge being not so shiny so far, my problem is that your example codes generate errors in Xcode (Version 11.3.1), so they just cannot be build and run.
E.g you wrote:
Move all files in a folder to another:
Now Xcode gives me the same error at all the above lines:
So what is the proper coding to use Files? E.g. what is the full code to move all files in a folder to another? Could you put it down it, please?
Thanks a lot in advance! Devy