A level-1 index filesystem. Implement a level-1 index filesystem. You can make any use you want of anything that I have posted on the rabbit web page. Material from other sources is of course not allowed. You must of course create a header block for every file, and you should store some meta-data in there. At least store the creation and last modification date/times in there, and the true length in bytes. Also a byte to represent protections, and another byte for file type. In the protections byte, only three bits have any meaning. One: is it allowed to delete the file, two: is it permitted to modify the file's contents, three: does the file contain executable code. The file type byte has only three possible values. One: it is an ordinary file, two: it is a directory, three: it is the fake file that just keeps the free blocks together. For the moment, the executable bit will not be used, and the file type can only be ordinary file. That will change in the future. For the moment, when a file is deleted the blocks that it occupied are lost. You do not have to keep any record of which blocks are free and which are in use, beyond the simple note in the superblock that says which is the first block that has never been used. That too will change in the future. For the moment, there will be no directories except for the root directory, and that should not be organised as a real file (i.e. it has no metadata, just a block full of directory entries). That too will change in the future. Slightly change the format of a directory entry. Now, they only need to contain the file's name and its header block number. Increase the name to 12 bytes and use 4 for header block number, making a nice round 16 bytes per entry. File names must be able to be the full 12 characters long, so don't rely on the directory entry's name having \0 termination. Make it all work by adding it to the IOSB structure from class 5, and extending the tiny shell that makes testing convenient from class 6. Do not change the iosb structure, do not include its code in your own program, just import it like the tiny shell does. You should take the tiny little shell program from class 6 and add to it and replace any functions that need replacing. Remember that the tiny shell makes use of the "extra" entries in an IOSB structure. You should do the same. You will want to keep the entry that gives you access to the file's directory entry, but the one that records the file's location on disc is not needed, that information is already in the directory entry. You will need an entry to record which block of the file is currently in the buffer, and another to store the pointer to the in-memory copy of the file's header block. You may add others if you want to. By "which block of the file", I am not referring to a block number, but to which pointer in the header block contains it. So if the buffer currently contains the first 512 bytes of the file, this number is zero. If it contains the second 512 bytes, it is 1, and so on. The file's true length in bytes does not need to be recorded separately. If the file is open for reading only, the real length can be found in its header block. If the file is open for writing, the current length is 512 * relative-block-number + iosb_pos, your current writing position relative to the beginning of the buffer. You must remember to copy this value into the right place in the header block when the file is closed. I think I have updated all of the functions in iosb and the tiny shell so that they reliably return negative error codes for failure and positive results for success. If I have missed any in iosb, tell me and I'll correct it. If I have missed any in the tiny shell, you just fix them in your own version. (readno has to be able to return any int value, so it has no way to signal an error). You will need to add a command that allows the protection on a file to be seen and/or changed. You can add other commands too if you think they will help. Submit test runs. Thorough testing is required: big files, little files, directory listing, deleting files, reading files, creating files, and reporting when something goes wrong. In the future there will be additions to this work: Properly keep track of free blocks, Multi-level index files, Subdirectories, Root directory becomes a file just like any subdirectory. If this version isn't working and fully tested, the extended version will be hopeless.