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

[Question]Where is the fs api?

Started by digpoe, 15 December 2012 - 08:35 AM
digpoe #1
Posted 15 December 2012 - 09:35 AM
I would like to know where the fs api is, if it is accessible. If it's not, then it would be a bad thing for me :(/>
EDIT: I mean the location of it in the ComputerCraft mods folder, by the way :)/>
Edited on 15 December 2012 - 08:44 AM
zekesonxx #2
Posted 15 December 2012 - 09:42 AM
All the default APIs come preloaded and are unable to be unloaded.
digpoe #3
Posted 15 December 2012 - 09:44 AM
All the default APIs come preloaded and are unable to be unloaded.
I didn't mean that, I meant where is the fs api in the ComputerCraft MODS folder. I should edit the main post, so people don't get that mixed up…
PixelToast #4
Posted 15 December 2012 - 09:53 AM
the fs api is hardcoded into computercraft

lua apis are located in:
minecraft/mods/computercraft/lua/rom/apis/
digpoe #5
Posted 15 December 2012 - 09:54 AM
the fs api is hardcoded into computercraft

lua apis are located in:
minecraft/mods/computercraft/lua/rom/apis/
I've looked there, but I can't seem to find a file named "fs" in there :(/>
PixelToast #6
Posted 15 December 2012 - 09:58 AM
I've looked there, but I can't seem to find a file named "fs" in there :(/>
the fs api is hardcoded into computercraft
ie you cant edit it wthout decompiling computercraft >_>
Luanub #7
Posted 15 December 2012 - 09:58 AM
Thats because its hardcoded in Java as Pixel stated.

You're only option is to overwrite it. Look down a couple post about read only files for an example.
digpoe #8
Posted 15 December 2012 - 10:01 AM
Daaarn.


Well, I'm going to need to start coding a readLine(linenum) function.. Unless if any of you know of a function that does somthing like that? Cause' I was messing about looking in the programs in the rom/programs folder and I found somthing.. I think it was "fs.readLine()" or somthing similar.
I couldn't get the help about io, if it was actually io.readLine(), because the "help io" command just links me to lua.org, which I can't be bothered to read at the moment.
PixelToast #9
Posted 15 December 2012 - 10:06 AM
Daaarn.


Well, I'm going to need to start coding a readLine(linenum) function.. Unless if any of you know of a function that does somthing like that? Cause' I was messing about looking in the programs in the rom/programs folder and I found somthing.. I think it was "fs.readLine()" or somthing similar.
I couldn't get the help about io, if it was actually io.readLine(), because the "help io" command just links me to lua.org, which I can't be bothered to read at the moment.
and is it really that hard to read the manual?
also, you can add any changes to the fs api in bios.lua
just dont replace readLine because it already exists c_c