University project for my OOP class
Implement a minimal file system similar to Unix file systems. The file system must support the most used Unix commands (for example: ls, cd, mkdir, touch etc.). In your implementation you must use Composite and Factory patterns. Your implementation must cover the following commands: adduser, deluser, chuser, cd, mkdir, ls, chmod, touch, rm, rmdir, writetofile,cat. If a command cannot be executed, you should print an error codes and a message. Possible error codes are:
- -1: : Is a directory
- -2: : No such directory
- -3: : Not a directory
- -4: : No rights to read
- -5: : No rights to write
- -6: : No rights to execute
- -7: : File already exists
- -8: : User does not exist
- -9: : User already exists
- -10: : No rights to change user status
- -11: : No such file
- -12: : No such file or directory
- -13: : Cannot delete parent or current directory
- -14: : Non empty directory