←  Programs

ComputerCraft | Programmable Computers for Minecraft

»

AmazeFile — CC Cloud File Storage(WIKI Rel...

iLikePHP's Photo iLikePHP 06 Mar 2014

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:

(Download) | (API Documentation)


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.
Edited by iLikePHP, 08 March 2014 - 12:10 PM.
Quote

iLikePHP's Photo iLikePHP 06 Mar 2014

Update released!
I fixed the following issue(s):
• File write names were not working properly.
Quote

iLikePHP's Photo iLikePHP 07 Mar 2014

If you have ideas, share them with me!
I'm going to be working like a beast over the weekend!
Quote

apemanzilla's Photo apemanzilla 07 Mar 2014

Not bad! A bit tricky to use for clients, though. Maybe a command-line/GUI based client to browse the files?
Quote

iLikePHP's Photo iLikePHP 07 Mar 2014

I'm making a wiki.
Quote

iLikePHP's Photo iLikePHP 07 Mar 2014

WIKI released, adding articles!
Quote

iLikePHP's Photo iLikePHP 08 Mar 2014

Server patch released.
Quote

LDShadowLord's Photo LDShadowLord 09 Mar 2014

I think this needs a file browser to work properly, an API and a server itself (while still good) is irritating for most people to use.
Quote

iLikePHP's Photo iLikePHP 09 Mar 2014

I am still learning Lua, how does a group of applications sound?
I could make a bunch of apps for upload/download/delete quite easily.
Quote

bjornir90's Photo bjornir90 09 Mar 2014

I think that what it needs is a graphical file browser as said before, to make it looks nicer and easier to use.
Quote

Zudo's Photo Zudo 09 Mar 2014

View PostApemanzilla, on 07 March 2014 - 10:41 PM, said:

Not bad! A bit tricky to use for clients, though. Maybe a command-line/GUI based client to browse the files?

:o just seen your avatar.

// on topic

I agree, a graphical browser would be nice to see.
Edited by ZudoHackz, 09 March 2014 - 09:18 AM.
Quote

apemanzilla's Photo apemanzilla 09 Mar 2014

View PostZudoHackz, on 09 March 2014 - 09:18 AM, said:

View PostApemanzilla, on 07 March 2014 - 10:41 PM, said:

Not bad! A bit tricky to use for clients, though. Maybe a command-line/GUI based client to browse the files?

:o just seen your avatar.
Was getting tired of the default avatar :P
Quote