|
@@ -52,6 +52,18 @@ class Resource {
|
|
|
public static function getBytes( name : String ) {
|
|
|
return php.io.File.getBytes(getPath(name));
|
|
|
}
|
|
|
+#elseif cpp
|
|
|
+ public static function listNames() : Array<String> {
|
|
|
+ return untyped __global__.__hxcpp_resource_names();
|
|
|
+ }
|
|
|
+ public static function getString(name:String) : String {
|
|
|
+ return untyped __global__.__hxcpp_resource_string(name);
|
|
|
+ }
|
|
|
+ public static function getBytes(name:String) : haxe.io.Bytes {
|
|
|
+ var array:haxe.io.BytesData = untyped __global__.__hxcpp_resource_bytes(name);
|
|
|
+ if (array==null) return null;
|
|
|
+ return haxe.io.Bytes.ofData(array);
|
|
|
+ }
|
|
|
#else
|
|
|
static var content : Array<{ name : String, data : String }>;
|
|
|
|