Operations
Create/Store - give filename, text to save
Delete a file
Rename
Copy
Open/Read
List
Implementation
This is to be implemented in c++ within a file. All data concerning the file system must be stored inside the filesystem itself. All file contents will be in text format, such as short sentences. Files can be limited in size (if that helps, for example to 100 bytes), but must be greater than one block. A block size of 10 would be appropriate.
Parts of File System
File Allocation Table (use a fixed size of File Control Blocks, maybe 20)
Free Allocation Table (array of bits)(pointers to clusters)(array of open block starting points with number of blocks free) (non contiguous is Linked List)
Actual Data (contiguous) (clusters of x size) (non contiguous Linked List)
Operations Discussion
Create/Store File
Provide filename and content
Ensure filename is unique
Decide if we have space for the file, locate location to place file
Copy file into location
Remove location from Free Allocation
Create a entry in the FAT
File Control Block: filename, starting location, creation time, size
Delete File
Provide filename
Ensure filename exists
Locate beginning of file
Mark allocated data as being free space in Free Allocation Table
Delete File Control Block
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here