snapshot_target(3)
π snapshot_target(3) π
okay so welcome to the Arcan Lua API manual, bestie β this one is about snapshot_target, and it's giving "please serialize your whole internal state into this resource" energy. β¨
β¨ NAME β¨
snapshot_target β request that a frameserver serializes its internal state into the specified resource. That's it, that's the whole main-character assignment. π
πΈ SYNOPSIS πΈ
bool:status
snapshot_target( vid:target, string:resource )
snapshot_target( .B )
snapshot_target( vid:target, string:resource, number:namespace,
string:description )
(Yes, bestie, that .B line is literally in the original β I am not editing the sacred text. π
)
π DESCRIPTION π
okay so what happens is: you create a new resource in the APPL_STATE_RESOURCE namespace, and a file reference gets sent there to target, asking it to store its state from that resource. Lowkey a little state-saving handoff, y'know? π«Ά
The return is a bool:status: it's false if the file could not be created because of permissions, and true if the file was created and sent successfully. No cap. β
If namespace is provided and that namespace is writable, the resource will instead be created inside that namespace. Highkey convenient. β¨
Depending on what kind of segment it is β CLIPBOARD, or a normal application window with a bchunk state exposed or in a mouse-drag β the client will interpret the operation as a save, a paste, or a drag-and-drop. It's giving "same action, different era." π
If description is provided, a short (~60ch) text type descriptor of the data can be amended. The convention is to treat this as a simplified MIME - type, with the application/ prefix being the default (and it can thus be omitted). iykyk. π
π¦ NOTES π¦
- Normally only the
APPL_TEMP_RESOURCEis writable, but the mechanism is reserved for user-defined namespaces as well. So like... it's not just a temp-resource situation forever, bestie. π
mwah π β this page's source/version is targetcontrol and the date is October 2026. periodt. π«Ά
π¦ 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