JohnSundell / Files

A nicer way to handle files & folders in Swift
MIT License
2.53k stars 182 forks source link

Building paths #66

Closed ghost closed 6 years ago

ghost commented 6 years ago

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.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

ghost commented 6 years ago

Ok scratch that my tests are passing on my second machine and not my first. Probably nothing to do with Files.