zap_resource(3)
β¨ zap_resource π
okay so bestie, welcome to zap_resource(3) β that's the Arcan Lua API page, and yes we're about to learn how to unlink a file in the appl-temp path or in a writable user namespace. it's giving "delete but make it licensed" π
πΈ NAME πΈ
zap_resource β unlink a file in the appl-temp path or writable user namespace. literally that's the whole gig, and she does it well π
π¦ SYNOPSIS π¦
bool:success, boolres
zap_resource( string:res )
zap_resource( string:res, string:namespace )
two flavours, same icon energy β¨
π DESCRIPTION π
so this function can be used to delete a file ποΈ periodt.
by default, this applies only to the appl-temp namespace. that's the default, no cap.
if namespace is provided and it matches a user-defined writable namespace ID (peep list_namespaces for that one π), then the deletion applies to a file in that namespace instead. main character behaviour only π
and it returns whether the file was successfully deleted or not β so like, you get a yes-or-no back, check it, don't just vibe and hope π«Ά
π§ EXAMPLE π§
here's the cute lil demo, copied exactly because we do not mess with code in this house:
function zap_resource0()
open_rawresource("test.out");
zap_resource("test.out");
if (resource("test.out")) then
warning("something went horribly wrong.");
end
end
so we open test.out, we zap test.out, then we check with resource("test.out") and scream into the void if it's still there. iconic quality assurance ngl π
π MISUSE π
okay babes, buckle up, because these two are the what-not-to-do section and they are NOT a vibe.
function zap_resource0()
zap_resource("/../../../../../../usr/bin/arcan");
end
function zap_resource1()
zap_resource("/../resources/scripts/mouse.lua");
end
bestie. do not do this. path traversal attempts like these are right there in the manual as MISUSE for a reason π like, the manpage literally filed them under "misuse" and went home.
π SEE ALSO π
okay so this page lives alongside resource β that's the name at the bottom of the original footer, and that's your reference breadcrumb π
and that's the whole page, bestie!! this one came from the Arcan Lua API, source line resource, dated October 2026, and the page is zap_resource(3) in case you need to cite it in your group chat. go forth and delete responsibly ππβ¨ππ¦πΈπ
π«Άπ₯πβπππππ§
π¦ where this page comes from
- nixos 26.05: arcan 0.7.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms