Closed RAJAGOPALAN-GANGADHARAN closed 4 years ago
@RAJAGOPALAN-GANGADHARAN I have an idea which may implemented for file system. But it depends on the scope of your project. If you aim to make this an emulation of an OS on the web, we can ask the user to login using a username at the beginning. Then the user can make directories and files using :
mkdir
, touch
etc. The files created will be updated in a fresh .json
file for respective user. A further implementation can be to include the contents of the file also in a .json
file. To view the files , an user can type ls
which would fetch contents from that .json
file.
*Commands mkdir
,touch
must be coded in JS which itself would be interesting. We have to think of another simpler way to make this happen.Let me know what you think about this.
Yes initially I had similar plans, you could try using the existing file manager app and terminal to do this. There is no way to port bash stuff from Linux ports, which leaves us with only choice to write actions for commands on our own. Maybe try making a generic command parser like for eg:if I type hello - - a like that we could identify that hello is the command and a is a parameter. I hope I don't confuse you, feel free to add more ideas and implement. This is a very big task so I will be adding a big bounty. Have fun.
@RAJAGOPALAN-GANGADHARAN Okay, so let's make a fs.json
file which has directories, files as well as files inside directories and lets try to implement a command tree
which would fetch the .json
file and display all the files. I think that would be enough for this issue. If we are able to achieve this small goal, we can easily move forward and create other commands on the go.
Sure great. Make sure you send related patches together i.e. Dont make a huge commit instead make in smaller parts. So it will be easy for me to review.
Also, I saw how you implemented the ls
command. That was a good try but it makes the code unnecessarily long and is not very efficient. I'll try to find another way
Yes as I said before, I was just testing stuff out. A More robust Implementation would be a proper commanline parser. See if you can do from there.
@RAJAGOPALAN-GANGADHARAN dont you think the bounty could have been a little more provided the work we managed to do ?
Well it seems we have some points rule that we have to adhere. Points can be given at max 15. There are many other issues to try to complete them all you can be on leaderboard.
In that case, we should probably divide the big issues such as this one, into smaller issues. And be awarded points accordingly. The terminal redesign was a project in itself, lol, and getting only 15 for that demotivated me a bit.
Alright as you wish 😄 . I should give you extra 10 points for opening lot of issues. So check now. Make one more Pr so i can add few points to it.
@RAJAGOPALAN-GANGADHARAN thanks a lot 😊.. btw for which issue should I create a PR ?
Make for commanline parser. Also it would be nice if you could look into issue #10 Even that requires work.
Sorry , I was off for a while. I'd love to work on #10 . Also, I'll make a PR for the tree command of the command parser 😊
Ability to store file data as Javascript Object