Quellcode durchsuchen

- fixed neko.io.File

Laurent Bedubourg vor 19 Jahren
Ursprung
Commit
56e75fdc2b
2 geänderte Dateien mit 5 neuen und 5 gelöschten Zeilen
  1. 1 1
      std/mtwin/templo/Preprocessor.hx
  2. 4 4
      std/mtwin/templo/Template.hx

+ 1 - 1
std/mtwin/templo/Preprocessor.hx

@@ -164,7 +164,7 @@ class Preprocessor {
 			throw "Macro file "+path+" does not exists";
 		}
 		macroFileStamp = neko.FileSystem.stat(path).mtime.getTime();
-		registerMacros(neko.File.getContent(path));
+		registerMacros(neko.io.File.getContent(path));
 	}
 
 	public static function registerMacros( str:String ){

+ 4 - 4
std/mtwin/templo/Template.hx

@@ -69,7 +69,7 @@ class Template {
 			}
 		}
 		compiledFiles.set(path,true);
-		var content = neko.File.getContent(Loader.BASE_DIR+"/"+path);
+		var content = neko.io.File.getContent(Loader.BASE_DIR+"/"+path);
 		return fromString(content, nekoId(path));
 	}
 
@@ -93,14 +93,14 @@ class Template {
 
 		s = "// generated from " + id + "\n//" + src.split("\n").join("//") + "\n" + s;
 
-		var f = neko.File.write(path, false);
-		f.write(s);
+		var f = neko.io.File.write(path, false);
+		f.writeBytes(s);
 		f.close();
 
 		var r = neko.Sys.command("nekoc -o "+Loader.TMP_DIR+" "+path+" 2> "+Loader.TMP_DIR+"/nekoc.out");
 		if (r != 0){
 			if (neko.FileSystem.exists(Loader.TMP_DIR+"/nekoc.out")){
-				throw "nekoc compilation of "+path+" failed ("+r+") : "+neko.File.getContent(Loader.TMP_DIR+"/nekoc.out");
+				throw "nekoc compilation of "+path+" failed ("+r+") : "+neko.io.File.getContent(Loader.TMP_DIR+"/nekoc.out");
 			}
 			else {
 				throw "nekoc compilation of "+path+" failed ("+r+") -- no nekoc.out available";