What to change for this StringByApppendingPathComponent : My Swift code is not working after converting to Swift2.2.
My code :

Swift 1.0 code:

    Class func getPath(filename:  String ) -> String {
    return NSSearchPathForDirectoriesInDomains(NSSearchPathDirectory.DocumentDirectory,NSSearchPathDomainMask.UserDomainMask,true)[0].stringByAppendingComponent(filename)
    }

Please help.
Thanks

