Implement the functionality of the "find" command in UNIX as an API that returns a list of files matching the provided search parameters. The search should be limited to name and size only.
For example:
- Find all files that start with
"abc" - Find all files that are greater than or equal to
2MBin size
You can assume you are provided a File object with the following methods:
getName()– get the name of a file or directorygetSize()– get the size of a fileisDir()– checks whether the given path is a directory or a filelistFiles()– returns a list of files if initialized with a directory
This problem asks you to design an API that behaves like UNIX `find`, but only filters files by name and size. The natural solution is to traverse the file tree recursively or with an explicit stack, then apply the requested predicates to each file. Directories are expanded through `listFiles()`, while files are checked against the search conditions such as prefix matching or minimum size. The key is clean separation between traversal and filtering logic.