@@ -11,7 +11,7 @@ import Foundation
1111public protocol FileResourceType {
1212
1313 /// Bundle this file is in
14- var bundle : NSBundle { get }
14+ var bundle : Bundle { get }
1515
1616 /// Name of the file file on disk
1717 var name : String { get }
@@ -23,7 +23,7 @@ public protocol FileResourceType {
2323public extension FileResourceType {
2424 /// Name of the file on disk with the pathExtension
2525 var fullName : String {
26- return [ name, pathExtension] . joinWithSeparator ( " . " )
26+ return [ name, pathExtension] . joined ( separator : " . " )
2727 }
2828
2929 /**
@@ -40,22 +40,22 @@ public extension FileResourceType {
4040
4141 - returns: The file URL for this resource or nil if the file could not be located.
4242 */
43- func url( ) -> NSURL ? {
43+ func url( ) -> URL ? {
4444 return bundle. URLForResource ( self )
4545 }
4646}
4747
4848public struct FileResource : FileResourceType {
4949 /// Bundle this file is in
50- public let bundle : NSBundle
50+ public let bundle : Bundle
5151
5252 /// Name of the file on disk, without the pathExtension
5353 public let name : String
5454
5555 /// Extension of the file on disk
5656 public let pathExtension : String
5757
58- public init ( bundle: NSBundle , name: String , pathExtension: String ) {
58+ public init ( bundle: Bundle , name: String , pathExtension: String ) {
5959 self . bundle = bundle
6060 self . name = name
6161 self . pathExtension = pathExtension
0 commit comments