Difference between revisions of "IO (API)"

From ComputerCraft Wiki
Jump to: navigation, search
(Undo revision 7446 by Negamartin (talk))
 
(21 intermediate revisions by 16 users not shown)
Line 1: Line 1:
 
IO is a reimplementation of the default Lua input / output API defined [http://www.lua.org/manual/5.1/manual.html#5.7 here], with some features trimmed. Most features should work. If you find a non-working feature, please list it here.
 
IO is a reimplementation of the default Lua input / output API defined [http://www.lua.org/manual/5.1/manual.html#5.7 here], with some features trimmed. Most features should work. If you find a non-working feature, please list it here.
  
List of non-working features from IO:
+
List of non-working features from IO as of ComputerCraft 1.55:
  
* file:seek(...) - Doesn't exist.
+
* io.open: Modes “a+”, “r+”, and “w+” are not supported.
 
+
* io.write: Does not accept multiple arguments.
 
+
* io.popen: Doesn’t exist.
 
+
* io.read: Only allows format string “*l”.
I hope this is the right place to add this.
+
* io.tmpfile: Doesn’t exist.
io.write using "wb"
+
* file:read: Doesn’t support format string “*n” or a character count.
Line 97 it expects a number and gets a string
+
* file:seek: Doesn’t exist.
For reference I am using this http://lua-users.org/wiki/SaveTableToFile with only moifications to make it run as an api
+
* file:setvbuf: Doesn’t exist.
It is the very first file:write in the save function
+
file:write("return {"..charE)
+
  
 +
All of the capabilities in this API are also available in the [[Fs (API)|Fs API]], along with some other functions not directly related to reading and writing individual files.
 
[[Category:APIs]]
 
[[Category:APIs]]

Latest revision as of 22:12, 31 July 2016

IO is a reimplementation of the default Lua input / output API defined here, with some features trimmed. Most features should work. If you find a non-working feature, please list it here.

List of non-working features from IO as of ComputerCraft 1.55:

  • io.open: Modes “a+”, “r+”, and “w+” are not supported.
  • io.write: Does not accept multiple arguments.
  • io.popen: Doesn’t exist.
  • io.read: Only allows format string “*l”.
  • io.tmpfile: Doesn’t exist.
  • file:read: Doesn’t support format string “*n” or a character count.
  • file:seek: Doesn’t exist.
  • file:setvbuf: Doesn’t exist.

All of the capabilities in this API are also available in the Fs API, along with some other functions not directly related to reading and writing individual files.