Description
In this laboratory you are going to finish the shell project.
- Here is the interface for the shell:
class Shell: public Filesys { Public : Shell(string filename, int numberofblocks, int blocksize); int dir();// lists all files int add(string file);// add a new file using input from the keyboard int del(string file);// deletes the file int type(string file);//lists the contents of file int copy(string file1, string file2);//copies file1 to file2 };
All functions return 1 if successful and 0 otherwise.
- Work on the constructor.
- Work on the add function. Note the add function should have an end of input character.
- Work on the delete function.
- Work on the type function which displays the content of the file.
- Work on the copy function which copies the content of one file to another.
Add the ls function to the Filesys class and add the dir function to the Shell class. See the ls function for Filesys here. See the dir function for Shell here. See the main program here.