What's a quick way to test to see a file exists? What's a quick way to test to see a file exists? ios ios

What's a quick way to test to see a file exists?


Swift v3:

let fileExists = FileManager.default.fileExists(atPath: somePath)

Thanks to Nikolay Suvandzhiev.

Objective-C (Original):

BOOL fileExists = [[NSFileManager defaultManager] fileExistsAtPath:somePath];