This project creates an unix-like filesystem and implements its main algorithms to create, delete, copy and move files. The main functionality is exposed using a Rest API which is consumed by a web page.
After cloning the project:
- Go to project's location
- Run
./gradlew bootRun
- Open the web application http://localhost:8080/v1/fs-simulator/
Swagger UI is included with this project so the Rest API can be easily explored. The Swagger UI can be found at: http://localhost:8080/v1/fs-simulator/swagger-ui.html
- Blocks = 1K
- Disk file = 1 MB
- inode list = 4 blocks = 16 inodes per block = 64 inodes in total
- 1 directory = 1 block = 1K
- 1 directory entry = 16 bytes (2 bytes: inode number, 14 bytes: name)
- Given above's point: 1 directory will contain 64 entries
Object | Description |
---|---|
Boot Block | It mocks the boot block with a size of 1K. It is located at block #1 |
Super Block | Contains the LIL and LBL. The size of super block is 2 blocks = 2K |
Inodes List | The inodes list contains all the inodes of the system. It uses 4 blocks of 1K. Each inode uses 64 bytes, given that, each block contains 16 inodes, so in total we have 64 inodes in our system |
Data Blocks | 8th node is used for root directory, so free blocks start from 9th block. |
Command | Description | Usage |
---|---|---|
createdir | Creates a new directory | createdir [--private] [directory name] |
createf | Creates a new file | createf [--private] [file name] |
removef | Removes a file or a directory (must be empty) | removef [file name] |
copyf | Copies a file or direcotory into a target directory | copyf [file name] [directory] |
listdir | Displays directory's content | listdir |
showf | Displays file's content | showf [file_name] |
gotodir | Move to the directory indicated | gotodir [dir_name] |
clear | Clear the terminal | clear |
- Mariam Castañeda
- Fabián Rivera