FlixelPathsUtil
View sourceclass
org.flixelgdx.util.FlixelPathsUtil
Utility class for simplifying asset paths and libGDX FileHandles.
Methods
asset(String)
shared(String)
fontAsset(String)
xmlAsset(String)
sharedImageAsset(String)
external(String)
resolveAudioPath(String)
Resolves an internal asset path to an absolute filesystem path that the native audio backend can open directly.
When running from the IDE the working directory is the assets/ folder, so the raw relative path works as-is. When running from a packaged JAR the assets are embedded as classpath resources and native engines cannot open them by name. In that case the resource is extracted to a temp file on first call, and the temp file's absolute path is returned. Results are cached so repeated calls for the same path do not produce extra temp files.
Parameters:
| Name | Description |
|---|---|
path | The internal asset path, e.g. "shared/sounds/foo.ogg". |
Returns: An absolute filesystem path that the audio backend can open.
See Also: FlixelAssetManager.resolveAudioPath