This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
Wochilly's profile picture

ChillManager - File Manager

Started by Wochilly, 20 November 2016 - 09:16 AM
Wochilly #1
Posted 20 November 2016 - 10:16 AM
ChillManager - File Manager
Let me introduce to you: CHILLMANAGER
Notice: this program is not getting any upgrades anymore. I'm moving on to something else.

It's a simple open source file manager.
To download it, simply type
pastebin get xLv9DLrL FileManager

Since it's open source, you can modify it and use it in any way you like.
Also, i know you will complain about that if you use cd then you type the directory .., instead of it bringing you back to the previous folder it brings you back to the root folder.Why is this? Well, since i'm just a beginner/intermediate programmer I cannot make it like the cd program in CraftOS, just use the File Manager after a while and you'll get used to it.
Changelog:
SpoilerUpdate Seven:

-Changed download, renamed to pastebin and can now do pastebin run
Update Six:
-Added mv(move) option
Update Five:
-Fixed download's ID checking code
Update Four:
-No more java.lang.ArrayIndexOutOfBoundsException: 256 (Hooray!)
Update Three:
-Added download option(pastebin)
-Need much more clicks to throw the error java.lang.ArrayIndexOutOfBoundsException: 256
Update Two:
Fixed the X button(Messed it up in Update One)
Update One:
-Added paint option
-Minor fixes and changes

This software is open source, you can use it in any way you like EXCEPT modifying it so that the user don't know who made it or fooled to think someone else made it.
Edited on 25 November 2016 - 01:27 PM
Piorjade #2
Posted 06 December 2016 - 06:45 PM
FYI my way of going back was this:
If you go somewhere, just save the current path in an extra string, change the directory and when the user presses back, it goes to the old directory (which is saved in that extra string).

(Ok that's not the EXACT way I did it. My exact way was using a table and everytime you press back, it loads the first entry of the table and removes it, leading to having the ability to go back step by step)
H4X0RZ #3
Posted 06 December 2016 - 10:17 PM
FYI my way of going back was this:
If you go somewhere, just save the current path in an extra string, change the directory and when the user presses back, it goes to the old directory (which is saved in that extra string).

(Ok that's not the EXACT way I did it. My exact way was using a table and everytime you press back, it loads the first entry of the table and removes it, leading to having the ability to go back step by step)

You could also use an overkill method and, every time the user presses back, the current path string is split into it's parts and you remove the last one, then you put it back together. You won't have a history that way though :P/>
TheRockettek #4
Posted 07 December 2016 - 06:48 AM
What I did in kfile (my file manager that i am making) is that i used fs.combine. It helped me alot. I was going to do some like string sub and string find stuff but i simply found this more productive.

path = "/" .. fs.combine(path,"..")
Edited on 07 December 2016 - 08:57 AM