20#include "platforms/is_platform.h"
52 for (fl::size i = 0; i < r.size(); ++i) {
56 if (candidate == path) {
63#if defined(FASTLED_TESTING) || defined(FL_IS_STUB)
79 if (probe.is_open()) {
90 fl::string lnkPath = pathStr;
98 constexpr fl::size kMaxLnkBytes = 8 * 1024;
99 fl::size sz = lnk.size();
100 if (sz > kMaxLnkBytes) {
106 lnk.read(&content[0], sz);
137#if defined(FASTLED_TESTING) || defined(FL_IS_STUB)
138 return asset_detail::resolve_host(p);
First-class asset handles for sketches that live under <sketch>/data/.
Opaque handle to a sketch-local asset.
void resize(fl::size count) FL_NOEXCEPT
const char * data() const FL_NOEXCEPT
const char * c_str() const FL_NOEXCEPT
fl::size size() const FL_NOEXCEPT
bool isValid() const FL_NOEXCEPT
fl::url lookup_registry(fl::string_view path) FL_NOEXCEPT
Look up an asset path in the registry. Returns invalid url() on miss.
fl::vector< AssetEntry > & registry() FL_NOEXCEPT
fl::url url
Resolved URL (or file:// for host).
fl::string path
Relative asset path (e.g. "data/track.mp3").
Process-local registry of (asset_path → resolved URL) pairs.
static constexpr openmode in
static constexpr openmode binary
fl::url resolve_asset(const asset_ref &a) FL_NOEXCEPT
Resolve an asset handle to a URL (or local file path) at runtime.
url parse_lnk(fl::string_view content) FL_NOEXCEPT
Parse the contents of a .lnk file into a fl::url.
void register_asset(fl::string_view path, const fl::url &u) FL_NOEXCEPT
Public helper: plug an asset mapping at runtime.
Base definition for an LED controller.
Lightweight URL parser for embedded environments.