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

Where is fs API (or fs.complete) defined?

Started by Selim, 24 January 2016 - 09:19 PM
Selim #1
Posted 24 January 2016 - 10:19 PM
Is it safe to assume that the fs API is defined the Java end of ComputerCraft? I have been looking around in the Lua files for it, but I have been unsuccessful.
I was hoping to be able to back-port the auto-complete functions of modern CC back to earlier versions, but if fs.complete is defined in Java I am not sure it is possible without re-writing it.
Edited on 24 January 2016 - 09:36 PM
H4X0RZ #2
Posted 24 January 2016 - 10:23 PM
the fs api is made in java. but fs.complete is just a specialized version of the "original" complete function (not sure what it was) i believe.
Edited on 24 January 2016 - 09:24 PM
Selim #3
Posted 24 January 2016 - 10:31 PM
Might you mean textutils.complete? That is the only one I have found so far in the Lua other than shell.complete which depends on fs.complete.
Edited on 24 January 2016 - 09:35 PM
Lupus590 #4
Posted 24 January 2016 - 10:40 PM
you may find parts of the fs api in bios.lua, but most of it will be in java
Selim #5
Posted 24 January 2016 - 10:43 PM
you may find parts of the fs api in bios.lua, but most of it will be in java
Ha ha! Thank you! fs.complete is defined within bios.lua!

Now I just need to make it all work as intended…
Edited on 24 January 2016 - 09:45 PM
Bomb Bloke #6
Posted 24 January 2016 - 10:46 PM
FWIW, here's a clone of fs.find() I scribbled out some time ago.
Selim #7
Posted 24 January 2016 - 11:22 PM
Ok, all is good now. The functions have been back-ported.
In case anyone wants to try it, more info here:
http://www.computercraft.info/forums2/index.php?/topic/24882-07bc-northbridge-terminal-os-back-ported-functions-online-storage-and-more/
Edited by