Hello everyone.
As I've been learning ComputerCraft, I've learnt a few things and decided to make you guys the best way of storing your files in a game, all on one computer; both public and private.
So, here we go… let me introduce it.
My program is called AmazeFile, it's a free, and simple storage server for your world. It supports private files, and global files.
Here's what it currently supports:
- Writing Files [ Private ] [ Global ]
- Reading Files [ Private ] [ Global ]
- Deleting Files [ Private ] [ Global ]
- Making Directories [ Private ]
- Listing Directories [ Private ] [ Global ]
- Specifying Initial Save Directory [ Server ]
- Easy to Use API [ Lua ]
Getting Started
Getting started with AmazeFile is easy! But there's a little setup that needs to be done first. Follow the following steps:
- Place a computer and type "edit startup"
- Enter "shell.run('/path/to/your/server {REDNET MODEM} {INITIAL PATH}');" /!\ Initial path is where your files will be saved. /!\
- Press CTRL, S and CTRL, E
Once you have done that, you're ready to download. You can download from the following link:
Once downloaded, make a floppy disk, move all the files from the zip archive to your floppy disk's folder on your real computer. When you have done this, and you're sure it's correct, insert the floppy into a floppy drive and navigate to it on your computer. Once in the directory, type "ls" to see if the files are there.
If you have done it correctly, you'll end up with the following folder structure:
- Program
- server
- API
- af
Move the file called "server" to the path you specified in your shell.run(); command(this is not the initial path).
When this is done, you must reboot. Upon startup, you should see something similar to:
AmazeFile - CC Cloud Storage by iLikePHP
If so, you've done the setup correctly.
Using the API
Using the API is simple, as it's supposed to be.
CD to the directory in which you have "af" saved. Then type "edit af".
All functions without "local" in front of them are the ones you can use. The following code shows you how to initialise the API:
os.loadAPI("/path/to/fa");
af.config({server id}, {rednet modem});
If you need any help at all, or would like to report a bug, please reply to this post and I'll get back to you ASAP.