Description
This laboratory is designed to get you started with the the third part of the project which involves writing a shell.
- Open your source file and write or copy the code for the class template for the Sdisk and Filesys.
- Now, copy the interface for the shell:
class Shell: public Filesys { Public : Shell(string filename, int blocksize, int numberofblocks); 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.
- Create function stubs (functions with no code) for the class functions.
- Work first on the constructor that creates the Shell.
- Work on the add function which creates a file.
- Work on the del function which deletes the file.
- Work on the type function which displays the content of the file.
In the next lab, we will write the dir and copy functions and then the main program. See the ls function for Filesys here. See the dir function for Shell here.