For the longest time, I was under the impression that the following would throw, if the file (or folder) didn't exist.
let rulesDocument = try folder.file(named: "Rules.pdf")
The code seems to read: "Try to build a path to this file named Rules.pdfat this location."
Similar to how a browser might behave if you "try" a URL to nowhere.
Might it be worth making a distinction between a File that you know exists and a PotentialFile that hasn't been confirmed to exist? You see this kind of 'evaluate at last minute' mentality throughout Swift.
For the longest time, I was under the impression that the following would throw, if the file (or folder) didn't exist.
The code seems to read: "Try to build a path to this file named
Rules.pdf
at this location."Similar to how a browser might behave if you "try" a URL to nowhere.
Might it be worth making a distinction between a File that you know exists and a PotentialFile that hasn't been confirmed to exist? You see this kind of 'evaluate at last minute' mentality throughout Swift.
The same kind of mentality as