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

Basic File Explorer v1.3

Started by pilotofsomething, 23 May 2016 - 03:55 AM
pilotofsomething #1
Posted 23 May 2016 - 05:55 AM
This is my first attempt to make a file explorer. It can view infinite directories and files in 1 directory.
It can run any programs that don't take arguments. You can type a directory to go to or the path to a file to run it by clicking the top bar.

Screenshots
Spoiler
The root directory

The programs directory at /rom/programs


pastebin get WSpWkcYz browser

Change Log
Spoilerv1.3
- You can now type a directory to go to or run a file directly by typing its path in the top bar.
v1.2.1
- Trying to run programs after scrolling now works correctly.
v1.2
- You can now scroll effectively removing limitations for viewing files.
v1.1
- You can now see what directory you are in at the top of your screen.
v1.0.2
- '..' no longer appears when in the root directory, fixing a crash.
v1.0.1
- Fixed some bugs that result in crashing.
. - Clicking on blank programs or directories crashed.
- Fixed click detection for running programs.
v1.0
- Initial Release
Edited on 24 May 2016 - 05:36 AM
GFX #2
Posted 23 May 2016 - 03:04 PM
Good job! But I noticed a strange bug. When you are in the root directory ("/") and click on the "..", the error "Invalid Path" appears. Please fix. If user is not understand in what directory it is in, so I suggest to make the top panel.

print("/"..shell.dir())
or
write("/"..shell.dir())

This code will allow the user to know where he is. I think it will be useful. ;)/>.
Edited on 23 May 2016 - 01:06 PM
pilotofsomething #3
Posted 23 May 2016 - 07:51 PM
Good job! But I noticed a strange bug. When you are in the root directory ("/") and click on the "..", the error "Invalid Path" appears. Please fix. If user is not understand in what directory it is in, so I suggest to make the top panel.

print("/"..shell.dir())
or
write("/"..shell.dir())

This code will allow the user to know where he is. I think it will be useful. ;)/>.

I actually tried to make it not display the '..' at the top when in the root directory, but it didn't work for me. I'll try to make it work that way.
EDIT: I might put that text displaying where the user is at the top, great suggestion. Also fixed the issue.
Edited on 23 May 2016 - 05:59 PM