on searchDirectory:folderPOSIXPath forExtensions:extensionList
-- make NSString of folder path
set folderPathNSString to current application's NSString's stringWithString:folderPOSIXPath
-- get file manager
set fileManager to current application's NSFileManager's defaultManager()
-- ask file manager for all subpaths recursively
set theFileNSArray to fileManager's subpathsOfDirectoryAtPath:folderPOSIXPath |error|:(missing value)
-- filter the array according to extension
set theFileList to (theFileNSArray's pathsMatchingExtensions:extensionList) as list
-- combine subpaths and folder path to get full paths
set finalList to {}
repeat with aSubpath in theFileList
set end of finalList to (folderPathNSString's stringByAppendingPathComponent:aSubpath) as text
end repeat
return finalList
end searchDirectory:forExtensions: