Open77.resource.generation([resource])
Generation number, incremented on every reload.
With no argument, returns the current resource generation. Pass a resource name to inspect that resource, or receive nil when it is missing.
Registered in ResourceHost.cpp as LuaResourceGeneration (line 6647).
Open77.resource.hasPermission(permission)
Whether the resource holds this permission.
Checks whether the current resource manifest grants an exact Open77 capability. It is a read-only convenience check; native APIs still enforce their own permission and must handle refusal results.
Registered in ResourceHost.cpp as LuaHasPermission (line 6651).
Open77.resource.name()
Name of the current resource.
Returns the current resource's immutable manifest name. This is equivalent to GetCurrentResourceName() and remains stable for the lifetime of the resource definition.
Registered in ResourceHost.cpp as LuaResourceName (line 6646).
Open77.resource.readFile(path)
Reads a file from the resource, within its declared allowlist.
Reads a file declared by the current resource manifest through a safe relative path. Undeclared files, traversal, oversized content and host filesystem paths are rejected.
Registered in ResourceHost.cpp as LuaReadFile (line 6650).
Open77.resource.state([resource])
State of a resource.
Returns the lifecycle state known for a resource name, or for the current resource when omitted. It is an immediate snapshot and does not wait for dependencies or mutate lifecycle state.
Registered in ResourceHost.cpp as LuaGetResourceState (line 6649).
Open77.resource.version()
Version declared in open77.lua.
Returns the version string declared by the current resource manifest. It is package metadata and is unrelated to the Open77 runtime or Lua interpreter version.
Registered in ResourceHost.cpp as LuaResourceVersion (line 6648).