Browse Source

allow saving file content

ncannasse 12 years ago
parent
commit
b4c8c2b670
1 changed files with 10 additions and 0 deletions
  1. 10 0
      hxd/res/LocalFileSystem.hx

+ 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
+	}
+	
 }