def find( *names )
os = FFI::Platform::OS
paths = @paths.collect{ |regexp,ps| regexp =~ os ? ps : [] }.flatten
files = @files.collect{ |regexp,fs| regexp =~ os ? fs : [] }.flatten
if paths.empty? and files.empty?
raise( LoadError, "Your OS (#{os}) is not supported yet.\n" +
"Please report this and help us support more platforms." )
end
results = paths.collect do |path|
files.collect do |file|
names.collect do |name|
Dir[ File.expand_path( File.join(path,file).gsub("[NAME]",name) ) ]
end
end
end
return results.flatten.select{ |r| File.exist? r }
end