Skip to content

amber-codex/COMP350_FinalProject

Repository files navigation

COMP350_FinalProject

How to Compile and Run (Added by Amber Barreto 12/4/25, Last updeated 12/7/2025) Compiling: gcc Commands.c Disk.c FileSystem.c Directory.c TimeStamp.c main.c -o prog

*Running*:
    ./prog

*To exit*:
    type exit command to exit

Concept Mapping (Added by Amber Barreto 12/5/25, last updated)

How will the file System work

  - is it similar to some current OS file systems
      * Yes, this project is a simplified version of the Unix Inode-Directory entry
      * Using an Inode-Directory entry keeps the system realistic, whilst remaining simple
          - Inode is the File Table, same Functionality, just more for a cleaner, more realistic structure
          - Directory is the Home Folder 

  - Code Blocks
      * Responsibility of tasks is divided amongst the other files to aid in the debugging stages and enhance the readability of code
          * File Structure
              COMP350_FinalProject
                  |
                  +--> Disk.C
                  |       - Simulates Computer Hardware
                  +--> Commands.c
                  |       - Set command loop for user 
                  +--> TimeStamp.c
                  |       - time stamps files
                  +--> Directory.c
                  |       - Root Directory
                  +--> Filesystem.c
                  |       - System Calls
                  +--> main.c
                          - user interface

How Data will be stored on disk

Block # | Contents Data Constructor
0 | Free Map (100 bytes) + Padding Freemap
1 | Reserved (unused)
2 | Reserved (unused)
3 | Reserved (unused)
4 | Reserved (unused)
5 | Reserved (unused)
6 | Reserved (unused)
7 | Reserved (unused)
8 | Reserved (unused)
9 | Reserved (unused)

10–99 File Data Blocks Inode
Block Layout:
-Bytes 0–31: Filename (null-terminated) -Bytes 32–511: File content (text)

Example of Data

(Block 0) Offset Size Meaning
0 1 Block 0 used? (always 1)
1 1 Block 1 used? (always 1)
...
9 1 Block 9 used? (always 1)
10 1 Block 10 used? (file or free) ...
99 1 Block 99 used? (file or free) 100–511 412 Unused padding (zeros)

File Block Layout Bytes 0–31 : Filename (ASCII, null-terminated)
Bytes 32–511 : File content (up to 480 bytes of text)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages