Having trouble figuring out how to make the following call in swift:
var anyError: NSError? = nil var rsrc: NSNumber? = nil var success = url.getResourceValue(&a
Here is drewag's code updated for Swift 2.0
do { var rsrc: AnyObject? try element.getResourceValue(&rsrc, forKey: NSURLIsDirectoryKey) if let number = rsrc as? NSNumber { if number == true { // do something } } } catch { }