Vendetta/API/resolve file
From Quasar-RCE
Definition
lib.resolve_file (path, ...) :: nil
Description
Attempts to load and execute a file using a variety of path options. This function attempts to make file loading behavior consistant across the game's state.
Arguments
- string filepath: path to the file to be accessed
- string ...: alternate path(s) to check
Returns
- boolean status: true if the file loaded successfully
- ...: results of the file, or a string error message
Other notes
- Added in LME 2.x (Neoloader indev)
- This function uses lib.find_file to verify the file exists, and will always execute the first found path.
- The file being executed will likely be loaded with pcall(), depending on the LME's "protectResolveFile" flag