Skip to content

songquanpeng/filesystem-emulator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

File System Emulator

Build

git clone https://github.com/songquanpeng/filesystem-emulator.git
cd filesystem-emulator
cmake .
make

Demo

ubuntu@VM-0-16-ubuntu:/$ vim test.py 1
print("Hello World!")

:wq
ubuntu@VM-0-16-ubuntu:/$ ls
INode Name
1     test.py
ubuntu@VM-0-16-ubuntu:/$ cat test.py
print("Hello World!")

ubuntu@VM-0-16-ubuntu:/$ stat test.py
File: /test.py
Inode: 1
Size: 1024 B
Type: regular file
Create time: 1637464120
Block address: 1
ubuntu@VM-0-16-ubuntu:/$ df
Available space: 16124 KB
Total block number: 16126  Used block: 2  Block size: 1024 B
Inode number: 4096  Inode size: 64 B

TODO List

  • Implement a basic shell for interact.
  • Able to create directory.
  • Able to create file.
  • Able to delete directory.
  • Able to delete file.
  • Able to list subdirs and files in target directory.
  • Able to show file content.
  • Able to edit file on creating.
  • Able to show directory's attributes.
  • Support relative path.
  • Able to change working directory.
  • Able to use all direct block addresses and indirect block address.
  • Support "." and "..".
  • When creating file, fill it with random string.
  • When deleting directory, recursively delete all content in it.
  • Able to copy file.
  • Able to move file.

About

Linux filesystem emulator.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published