         return isAbsolutePath && isDirectory
     }
     
-    internal func _getExtensionChecker(extensions: [String]?, caseSensetive: Bool) -> (String?) -> Bool {
+    internal typealias _FileNamePredicate = String? -> Bool
+    
+    internal func _getNamesAtURL(filePathURL: NSURL, prependWith: String, nameValidator: _FileNamePredicate, typeValidator: _FileNamePredicate) -> [String] {
+        var result: [String] = []
+        
+        if let enumerator = NSFileManager.defaultManager().enumeratorAtURL(filePathURL, includingPropertiesForKeys: nil, options: .SkipsSubdirectoryDescendants, errorHandler: nil) {
+            for item in enumerator.lazy.map({ $0 as! NSURL }) {
+                let itemName = item.lastPathComponent
+                
+                let matchByName = nameValidator(itemName)
+                let matchByExtension = typeValidator(item.pathExtension)
+                
+                if matchByName && matchByExtension {
+                    if prependWith.isEmpty {
+                        result.append(itemName!)
+                    } else {
+                        result.append(prependWith.bridge().stringByAppendingPathComponent(itemName!))
+                    }
+                }
+            }
+        }
+        
+        return result
+    }
+    
+    internal func _getExtensionChecker(extensions: [String]?, caseSensetive: Bool) -> _FileNamePredicate {
         guard let exts = extensions else {
             return { _ in true }
         }

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

            return 0
        }

        var matches = _getNamesAtURL(urlWhereToSearch, prependWith: "", nameValidator: checkFileName, typeValidator: checkExtension)
        
        if matches.count == 1 {
            let theOnlyFoundItem = NSURL(fileURLWithPath: matches[0], relativeToURL: urlWhereToSearch)
            if theOnlyFoundItem.hasDirectoryPath {
                matches = _getNamesAtURL(theOnlyFoundItem, prependWith: matches[0], nameValidator: { _ in true }, typeValidator: checkExtension)
            }
        }
        
