SLProject  4.2.000
A platform independent 3D computer graphics framework for desktop OS, Android, iOS and online in web browsers
SLIOLocalStorage Namespace Reference

Collection of functions for accessing browser local storage. More...

Functions

bool exists (std::string path)
 

Detailed Description

Collection of functions for accessing browser local storage.

Function Documentation

◆ exists()

bool SLIOLocalStorage::exists ( std::string  path)

Definition at line 14 of file SLIOLocalStorage.cpp.

15 {
16  // clang-format off
17  return MAIN_THREAD_EM_ASM_INT({
18  let path = UTF8ToString($0);
19  let key = "SL:" + path;
20  return localStorage.getItem(key) !== null;
21  }, path.c_str());
22  // clang-format on
23 }