瀏覽代碼

allow saving file content

ncannasse 12 年之前
父節點
當前提交
b4c8c2b670
共有 1 個文件被更改,包括 10 次插入0 次删除
  1. 10 0
      hxd/res/LocalFileSystem.hx

+ 10 - 0
hxd/res/LocalFileSystem.hx

@@ -231,4 +231,14 @@ class LocalFileSystem implements FileSystem {
 		#end
 		#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
+	}
+	
 }
 }