Daily iOS
ArchitectureKuaishou

Extensible search API

Here's a file search function. Now it has to find only "UTF-8 txt or H.264 mp4" and "files modified within the last week," and the conditions will keep growing. How do you extend this API without adding parameter after parameter?

func findFiles(in dir: URL, suffix: String) -> [URL]

Submit