Binaries
spec.Binaries (Interface) → backend.Binaries
Backend interface for binary data loading operations.
This interface handles loading raw binary files from various sources (disk, network, embedded). Binary data is returned as Haxe Bytes objects, which provide cross-platform byte array handling.
Used by the BinaryAsset class and other systems that need raw file access.
Instance Members
load(path: String, ?options: Null<backend.LoadBinaryOptions>, done: Function): Void
Loads binary data from the specified path. The path is relative to the assets directory unless it's an absolute path or URL.
Name | Type | Default | Description |
---|---|---|---|
path |
String | The path to the binary file to load | |
options |
Null<backend.LoadBinaryOptions> | (optional) | Optional loading configuration (caching, hot-reload, etc.) |
done |
Function | Callback invoked with the loaded Bytes data or null on failure |
supportsHotReloadPath(): Bool
Checks if the backend supports hot-reloading of binary files.
When true, files can include a ?hot=timestamp
query parameter to bypass caching
and force reloading when the file changes during development.
Returns | Description |
---|---|
Bool | True if hot-reload paths are supported, false otherwise |