Runtime utilities to compute asset lists/names from raw (relative) file list. Code is very similar to AssetsMacro, but for runtime execution, with any list of asset.

Static methods

Constructor

new(allAssets:Array<String>, ?path:String)

Variables

@:value(null)read onlypath:String = null

Methods

reset(allAssets:Array<String>, ?path:String):Void

@:value({ dir : false })getNames(kind:String, ?extensions:Array<String>, dir:Bool = false):Array<{paths:Array<String>, name:String, constName:String}>

getLists():{allDirsByName:Map<String, Array<String>>, allDirs:Array<String>, allByName:Map<String, Array<String>>, all:Array<String>}

getEncodableLists():{allDirsByName:Dynamic<Array<String>>, allDirs:Array<String>, allByName:Dynamic<Array<String>>, all:Array<String>}

Same as getLists(), but will transform Maps into JSON-encodable raw objects.