Resource can be used to access resources that were added through the --resource file@name command line parameter.

Depending on their type they can be obtained as String through getString(name), or as binary data through getBytes(name).

A list of all available resource names can be obtained from listNames().

Static methods

@:has_untyped@:keep@:keepstaticgetBytes(name:String):Bytes

Available on cpp, hl, neko, jvm, python, flash, macro, php

Retrieves the resource identified by name as an instance of haxe.io.Bytes.

If name does not match any resource name, null is returned.

staticgetBytes(name:String):Null<Bytes>

Available on js, lua

Retrieves the resource identified by name as an instance of haxe.io.Bytes.

If name does not match any resource name, null is returned.

@:has_untyped@:keep@:keepstaticgetString(name:String):String

Available on cpp, hl, neko, jvm, python, flash, macro, php

Retrieves the resource identified by name as a String.

If name does not match any resource name, null is returned.

staticgetString(name:String):Null<String>

Available on js, lua

Retrieves the resource identified by name as a String.

If name does not match any resource name, null is returned.

@:has_untyped@:keep@:keepstaticlistNames():Array<String>

Lists all available resource names. The resource name is the name part of the --resource file@name command line parameter.