Author: Stan Eisenstat
Subject: Data structures for fiend
Date: Thursday, 10 Sep 2020, 08:56:59
The command-line arguments must be "parsed" before the first traversal to check for errors (e.g., no argument following -newer or -name). The parsed output COULD include a data structure with the list of files and/or a data structure with the components of EXPRESSION. The components COULD be processed further (e.g., by combining the arguments to each -exec into a separate data structure such as an array or a string). Or it COULD be argv[] itself. All of these approaches work and require more or less the same amount of code (the argv[] approach requires slightly more since parsing is done in two places). Pick the one that is easiest for YOU to understand and implement. --Stan-PREV INDEX NEXT