Parcourir la source

Lua : add FileHandle

Justin Donaldson il y a 9 ans
Parent
commit
bba021e497
1 fichiers modifiés avec 17 ajouts et 0 suppressions
  1. 17 0
      std/lua/FileHandle.hx

+ 17 - 0
std/lua/FileHandle.hx

@@ -0,0 +1,17 @@
+package lua;
+
+extern class FileHandle extends UserData {
+	public function flush() : Void;
+	public function read(arg : haxe.extern.EitherType<ReadOption,Int>) : String;
+	public function close() : Void;
+
+	@:overload(function () : Int {})
+	public function seek(arg : String, pos : Int) : Void;
+}
+
+@:enum
+abstract ReadOption(String) {
+	var All = "*all";
+	var Line = "*line";
+	var Number = "*number";
+}