

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
A programming assignment for the cop4610 - introduction to operating system principles course, where students are required to implement various features of a file manager for an ms-dos formatted floppy disk using the posix floppy disk driver api. The assignment includes designing and implementing functions for directory listing, changing the current directory, and deleting a file.
Typology: Assignments
1 / 2
This page cannot be seen from the preview
Don't miss anything!


COP4610 - Introduction to Operating System Principles Programming Assignment 4: MSDOS FAT12 File System December 8th, 2006 Goal You will implement a simple file system, MSDOS FAT12 File System. You will design and implement a set of directory operations on a floppy disk drive. Project Description You will implement various features of a file manager for an MS-DOS formatted floppy disk by using the POSIX floppy disk driver API. This is a user level program and it does not require any kernel reconfiguration or compilation. Part A Design and implement a function to provide a directory listing (like the ls command in UNIX). int fd_ls(); After you have completed Part A, your function will be able only to list the files in the root directory. Part B Design and implement a function to change the current diretory up to one level or to a subdirectory in the current directory (you do not need to handle pathnames): int fd_cd(char * directory); This function assumes that you have implemented subdirectories. You will probably find it helpful to use a static variable in your file system implementations to represent the current directory. This function is to manipulate the current directory variable. You should now modify your ls command to be able to list files in the current directory. Part C Design and implement a function to delete a file. It should take the name of a file to delete (from the current directory) as its argument: int fd_rm(char * name); The function needs to find the file, follow its links in the FAT, set each cluster’s entry in the FAT to mark it as unused, and update the directory entry. In the case of deletion, pay attention to the hidden, read-only, and system attributes. Files with any of these set should not be deleted. 08/29/05 1 / 2
COP4610 - Introduction to Operating System Principles Submission Instructions