 	/// - Returns: the localized name
 	public func localizedName() -> String {
 		var appName: String = (self.deletingPathExtension().lastPathComponent)
-		var appNameObj: AnyObject?
 		do {
-			let bridged = self as NSURL
-			try bridged.getResourceValue(&appNameObj, forKey: URLResourceKey.localizedNameKey)
-			if let localName = appNameObj as? String {
+			let rsrcs = try resourceValues(forKeys: [.localizedNameKey])
+			if let localName = rsrcs.localizedName {
 				appName = localName
 			}
 			//remove any extension

	/// - Returns: true if this URL represents a directory on the local file system
	public func directoryExists() -> Bool {
		guard isFileURL else { return false }
		if let values = try? resourceValues(forKeys: [.isDirectoryKey]) {
			return values.isDirectory!
		}
		return false
	}


	public func fileSize() -> Int64 {
		guard self.isFileURL else { return 0 }
		do {
			let rsrcs = try resourceValues(forKeys: [.fileSizeKey])
			if let size = rsrcs.fileSize {
				return Int64(size)
			}
		} catch _ {}
		return 0
