Search Function - rsanchez-wsu/jfiles GitHub Wiki
Functionality
For the very basics a user should be able to click inside of a text box within the GUI, enter the exact name of a file or directory, then press a nearby button labeled "Search". The program will then show a listing somewhere within the GUI of the results of the search(Either displays the file or "No Results Found")
Additional functionality should support:
-The options to also search child folders or all folders for the specified file(Checkbox options? Drop down menu?)
-Partial matching of the search string. Requires the search results within the GUI to display multiple possible results.
-Regular expression search options.(Enabled either through checkbox option within the GUI or specific syntax within the search field)
-Logging of the search history. Can be implemented in the future as an auto-fill for similar searches, or as a Quick Access for frequently searched items.
Current State
Currently the search function is called by passing either FIND or FINDR to the server along with a search pattern.
eg. FINDR JFiles*
The FIND command calls the findCmd() method which searches through the directory given to it as a parameter and writes the names of files as it finds them to the client console. The search pattern can contain Glob Patterns.
The FINDR command works similar to FIND, but it calls recursiveFindCmd(). recursiveFindCmd() recursively finds all child directories and uses findCmd() to then search through them.