2
0
Эх сурвалжийг харах

allow saving file content

ncannasse 12 жил өмнө
parent
commit
b4c8c2b670

+ 10 - 0
hxd/res/LocalFileSystem.hx

@@ -231,4 +231,14 @@ class LocalFileSystem implements FileSystem {
 		#end
 	}
 	
+	public function saveContent( path : String, data : haxe.io.Bytes ) {
+		#if air3
+		var f = open(path);
+		var o = new flash.filesystem.FileStream();
+		o.open(f, flash.filesystem.FileMode.WRITE);
+		o.writeBytes(data.getData());
+		o.close();
+		#end
+	}
+	
 }