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

My [Sexy] Little File Storage Program

Started by Kizz, 26 August 2014 - 04:16 PM
Kizz #1
Posted 26 August 2014 - 06:16 PM
I call it the Kizz Easy Storage Solution or KESS.

In essence it allows you to save your programs to a dedicated computer that you wish to use as a storage server, as well as creating new floppies more easily.

Here is the raw code:

Latest Version: 1.25

GitHub: https://github.com/kizz12/KESS

Pastebin here for easier reading/direct integration: http://pastebin.com/xNksymyL

EDIT: Added ability to delete files, change storage directory and view disk.
EDIT2: Added ability to rename floppies and removed a bug involving the disk API.

Some screenies:

http://imgur.com/a/Aujex













Enjoy and feel free to use my code guys. Also I may release a later version with more error catches and more features if requested.
Edited on 27 August 2014 - 04:37 PM
rhyleymaster #2
Posted 27 August 2014 - 10:37 AM
Instead of literally pasting the code, mind putting it in pastebin? It'd help… A lot…

Other than that, great program!
Kizz #3
Posted 27 August 2014 - 01:16 PM
Haha just below the pasted code:
Pastebin here for easier reading/direct integration: http://pastebin.com/KaQQSZ1k
MKlegoman357 #4
Posted 27 August 2014 - 03:09 PM
If there is a pastebin link already, I don't think there is a reason to put the whole code here, it only makes the post longer. Pastebin code viewer is better too as it supports Lua syntax highlighting and line numbers, which these forums don't.
Edited on 27 August 2014 - 01:10 PM
Kizz #5
Posted 27 August 2014 - 03:55 PM
As requested, I have removed the live code, added a GitHub link, uploaded the latest version and added some fancy features. Enjoy!
Kizz #6
Posted 27 August 2014 - 05:59 PM
Updated to 1.25. Added floppy label ability and fixed a disk API bug.

Fixed pastebin link not updating.
Edited on 27 August 2014 - 04:37 PM
Ziriee #7
Posted 27 August 2014 - 09:39 PM
I read your code…
You need to work on compacting your code, you can use tonumber(value) to convert to a number and you can use os.pullEvent("char") for your menu.
Also you don't need to write "if value==true" or "if value==false", you can use "if value" and "if not value"
Kizz #8
Posted 28 August 2014 - 01:17 PM
It's the way I program because it's how I learned. It makes troubleshooting and code correction much easier and is the standard for most languages. It may take more space and time but in the end, debugging and formatting is much cleaner. It's personal preference. Plus I'm no master of Lua. I haven't read all the api's and I don't have them memorized. I do appreciate the advice though.