FileSystem improvements

This commit is contained in:
Djeeberjr 2022-03-11 00:16:15 +01:00
parent f9243dbcd2
commit 94c3101f50

View File

@ -16,11 +16,14 @@ abstract OpenFileMode(String) {
extern class FileHandle { extern class FileHandle {
public function readLine(?withTrailing:Bool):Null<String>; public function readLine(?withTrailing:Bool):Null<String>;
public function readAll():Null<String>; public function readAll():Null<String>;
public function read(?count:Int):Null<String>; /**
Returns Int or if `count` is given it returns a string.
**/
public function read(?count:Int):Null<Dynamic>; // TODO: better type
public function write(data:String):Void; public function write(data:String):Void;
public function writeLine(data:String):Void; public function writeLine(data:String):Void;
public function flush():Void; public function flush():Void;
public function seek(?whence:String, ?offset:Int):Void; public function seek(?whence:String, ?offset:Int):Int;
public function close():Void; public function close():Void;
} }