From 700592724871ad1106dac2d84952975793cfea8e Mon Sep 17 00:00:00 2001 From: Nat Quayle Nelson Date: Sun, 25 Apr 2021 03:07:49 -0600 Subject: [PATCH] make Stream usable on non-sys targets --- src/kiss/Stream.hx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/kiss/Stream.hx b/src/kiss/Stream.hx index 9a20918..bfe4d62 100644 --- a/src/kiss/Stream.hx +++ b/src/kiss/Stream.hx @@ -1,6 +1,8 @@ package kiss; +#if (sys || hxnodejs) import sys.io.File; +#end import haxe.ds.Option; using StringTools; @@ -42,9 +44,11 @@ class Stream { public var startOfLine = true; + #if (sys || hxnodejs) public static function fromFile(file:String) { return new Stream(file, File.getContent(file)); } + #end public static function fromString(content:String) { return new Stream("string", content);