Design a File Search Tool (Unix find)

Medium · Low-Level Design · about 40 minutes

Asked at Amazon, Microsoft, Dropbox, Notion, Rubrik.

Design the classes for a file search tool like Unix find. Given a directory tree, return the files that match a set of criteria: name pattern, extension, minimum or maximum size, type (file or directory). Criteria can be combined with AND, OR and NOT, and new criteria should be easy to add.

Related guides