         }
     }
     
-    internal func _getFileNameChecker(prefix: String?, caseSensetive: Bool) -> (String?) -> Bool {
+    internal func _getFileNameChecker(prefix: String?, caseSensetive: Bool) -> _FileNamePredicate {
         guard let thePrefix = prefix else {
             return { _ in true }
         }

            return 0
        }

        var matches: [String] = []
        
        if let enumerator = NSFileManager.defaultManager().enumeratorAtURL(urlWhereToSearch, includingPropertiesForKeys: nil, options: .SkipsSubdirectoryDescendants, errorHandler: nil) {
            for item in enumerator.lazy.map({ $0 as! NSURL }) {
                let itemName = item.lastPathComponent
                
                let matchByName = checkFileName(itemName)
                let matchByExtension = checkExtension(item.pathExtension)
                
                if matchByName && matchByExtension {
                    matches.append(itemName!)
                }
            }
        }
        
        if matches.count == 1 {
            let u = NSURL(fileURLWithPath: matches[0], relativeToURL: urlWhereToSearch)
            if u.hasDirectoryPath {
                var newMatches: [String] = []
                if let enumerator = NSFileManager.defaultManager().enumeratorAtURL(u, includingPropertiesForKeys: nil, options: .SkipsSubdirectoryDescendants, errorHandler: nil) {
                    for item in enumerator.lazy.map({ $0 as! NSURL }) {
                        let itemName = item.lastPathComponent!
                        let matchByExtension = checkExtension(item.pathExtension)
                        
                        if matchByExtension {
                            newMatches.append(_storage.bridge().stringByAppendingPathComponent(itemName))
                        }
                    }
                }
                
                outputArray = newMatches.map { $0.bridge() }
                outputName = (_storage + "/").bridge()
                return outputArray.count
            }
        }
        

        
        return matches.count
    }

    internal func _stringIsPathToDirectory(path: String) -> Bool {
        if !path.hasSuffix("/") {
            return false
