最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

What does it mean for `haxe --resource <file>[@name]` to "add" a named resource? - Stack Overflo

programmeradmin1浏览0评论

The Haxe manual page for compiler usage shows

-r <file>[@name] (or --resource <file>[@name]) Add a named resource file.

What does it mean for it to "add" a named resource file? Add it to what? Is the @name part optional? How can I access this custom name?

The Haxe manual page for compiler usage shows

-r <file>[@name] (or --resource <file>[@name]) Add a named resource file.

What does it mean for it to "add" a named resource file? Add it to what? Is the @name part optional? How can I access this custom name?

Share Improve this question edited Mar 18 at 23:56 DivergentSpaceTimeWanderer asked Mar 18 at 14:19 DivergentSpaceTimeWandererDivergentSpaceTimeWanderer 9,1676 gold badges43 silver badges59 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 1

-r / --resource adds resources that are then accessed through haxe.Resource.

So, if you do --resource test.txt, you'll be able to do Resource.getString("test.txt") to retrieve the contents of the resource.

Using @name allows to override the resource name - if you do --resource test.txt@X, you would be accessing it using Resource.getString("X") instead.

发布评论

评论列表(0)

  1. 暂无评论