From 94c3101f50d563f3528b67a47bff7f7c9085fa04 Mon Sep 17 00:00:00 2001 From: Djeeberjr Date: Fri, 11 Mar 2022 00:16:15 +0100 Subject: [PATCH] FileSystem improvements --- src/cc/FileSystem.hx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/cc/FileSystem.hx b/src/cc/FileSystem.hx index 7ff4021..0af3ccd 100644 --- a/src/cc/FileSystem.hx +++ b/src/cc/FileSystem.hx @@ -16,11 +16,14 @@ abstract OpenFileMode(String) { extern class FileHandle { public function readLine(?withTrailing:Bool):Null; public function readAll():Null; - public function read(?count:Int):Null; + /** + Returns Int or if `count` is given it returns a string. + **/ + public function read(?count:Int):Null; // TODO: better type public function write(data:String):Void; public function writeLine(data:String):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; }