added core linux file system (kinda)

This commit is contained in:
valentijn
2024-02-03 14:17:58 +01:00
parent beda73729d
commit 61c6426665
4 changed files with 71 additions and 9 deletions

View File

@@ -57,7 +57,7 @@ function cd(req, res, raw_command) {
}
if (argument === "~" || argument === "~/"){
req.session.state.directory = `/home/${req.session.state.username}`;
req.session.state.directory = `/home/${req.session.state.username}/`;
respondToCommand(req, res, "", req.session.state.directory, command);
return;
}
@@ -114,6 +114,7 @@ function help(req, res) {
Here is a list of the available commands:<br><br>
"help" - shows you this menu<br>
"info" - shows you some information about the system<br>
"clear" - clears the screen from previous ran commands<br>
"ls" - shows you the files and directories in your current directory<br>
"cd" - move into a folder you specify, you can use the name of the folder, or you can also use things like ../ to move back one folder<br>