resource(3)

πŸ“¦
version 0.7.1 Β· 2 versions
, in nixos 26.05

πŸ’– NAME πŸ’–

okay so bestie, welcome to resource(3) β€” this is the Arcan Lua API, and the whole vibe is: check if the requested resource path exists. That’s it. That’s the assignment. πŸ’…


🧚 SYNOPSIS 🧚

longname. typedescr
resource( string:name )
resource( string:name, int:domain )

πŸ”₯ DESCRIPTION πŸ”₯

so this function tries to resolve the path description indicated by name, and it can optionally be filtered by domain. no cap.

the accepted domain values follow the same rules as other resource related functions β€” see glob_resource for that whole situation. πŸ‘€

by default, all user-accessible domains are scanned, and the resolved result (or nil) is returned as longname. typedescr will be set to "directory", "file" or "not found". literally that simple, fr fr. ✨


🌈 EXAMPLE 🌈

like, here’s the code vibe check:

function resource0()
      print( resource("images/icons/arcanicon.png") );
      print( resource("test.png", APPL_RESOURCE) );
end

cute little sign-off: this page is the resource manual from the Arcan Lua API, dated October 2026, and it lives at resource(3) β€” mwah, go check those paths bestie πŸ«ΆπŸŽ€πŸ’–

πŸ“¦ where this page comes from