Resource

Resource

package haxe

Available on all platforms

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

static getBytes (name:String):Bytes

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

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

static getString (name:String):String

Retrieves the resource identified by name as a String.

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

static listNames ():Array<String>

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

© 2005–2016 Haxe Foundation
Licensed under a MIT license.
http://api.haxe.org/haxe/Resource.html

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部