Oodle: Object Oriented Directory Listing and Expansion

For code we discussed as part of this assignment see the oodle code page.

See this page for details on what to turn in

You will design and implement Oodle, a program that reads and processes directory entries. Oodle will be implemented in stages:


Grading

Stage one is due on Friday, January 24, 8:00 am. It will contribute 5 points towards the final Oodle grade.

Stage two is due on Wednesday, January 28, 8:00 am. It will contribute 10 points, and will be used to help you prepare for stage three.

Stage three is due on Monday, February 3, 8:00 am. It will be worth 35 points so that the Oodle assignment contributes 50 points towards the final grade in CPS 108.

There will be a small, individual assignment you must complete by February 3 as well.


Oodle Stage One

Your program should take a single command-line argument: the name of a directory. All files and subdirectories of this named directory will be processed. After processing all files and subdirectories, the user should be shown a printed list, the subdirectories should be differentiated from regular files in some manner. At the end of this list of directory entries, the user will have a choice of options:

When visiting a subdirectory, all its entries are shown and a user has the same options as above, plus the option of returning to the parent subdirectory. For stage one you do not need to implement multiple sorts, you only need to show one view, sorted alphabetically.

As part of the code for Oodle stage one you must design and implement a class that has the same functionality as the system call scandir (see below). The scandir function is available only on BSD Unix systems so is in some sense deprecated.

You do not need to use this class exclusively, but you must implement it.


Oodle Stage Two

For stage twooodle you must implement the sorting options described in stage one. You must also implement your program so that it is well done from an object-oriented view.There should be almost no non-class based code. You should think about where patterns are appropriate, for example you should use iterators where appropriate.

Extras

To earn an A you must do more than is expected in addition to doing what is expected reasonably well. You can do more by adding functionality (more options), having a very nice user interface, or using classes and patterns that go beyond what is expected.


Oodle Stage Three

In the third stage of Oodle you will design and implement a method so that the results of an Oodle usage are stored or cached. If Oodle is invoked with a directory that has been oodled in the past (oodle probably should not be a verb) then the results of the two runs should be compared if the user requests this option. A comparison will show, in a way that makes sense, changes between the Oodle runs. Changes should be shown as close to the root directory with which Oodle was invoked as possible. For example, if a subdirectory is removed, then this should be reported, but the changes that ensue because all entries in the subdirectory are missing should not be reported. All changes that result from files being added , deleted, or changed in size between the two runs should be reported.

The grades for stage three will be based on how well your program is designed, and how efficient it is. For example, the total amount of memory used , the time used, and the disk space used are all criteria that will be used to evaluate your program.

An important grading criterion will be how well you use patterns when appropriate. Note that your stage one code may be redesigned for grading as part of stage two since design will be important.

Extras

Extras for stage three can include using gzip to store information. We'll discuss how you might use a zippable stream in a program. Extra options you think might be useful or interesting are appropriate extras as well.


Scandir

The Linux man page for the scandir command is available, it is better written and explained than the Solaris man pages. You'll see that scandir uses pointers for arrays and strings. In your class equivalent version you should use the string class (either "CPstring.h" or <string>) and the Vector class. In future assignments we'll be covering C-style strings and arrays, but using these now will make it harder to debug your program.


Coding Conventions

All private instance variables should have a my Prefix. Static variables have an our prefix. Member functions can begin with either upper or lower case names but should be uniform in this regard. Identifiers should use capitalization rather than underscores, e.g., getDirEntry rather than get_dir_entry.