TTDT_FILE_NOTICE(3)
π ttdt_file_notice β the file-notice-maker β¨
okay so bestie, you're in the tttk library call section and this little function is your go-to for making and yeeting standard ToolTalk notices about a file π
πΈ NAME πΈ
ttdt_file_notice β create and send a standard ToolTalk notice about a file. that's it, that's the whole vibe π
β¨ SYNOPSIS β¨
#include &<Tt/tttk.h>
Tt_message ttdt_file_notice(
Tt_message context,
Tttk_op op,
Tt_scope scope,
const char *pathname,
int send_and_destroy);
π¦ DESCRIPTION π¦
so ttdt_file_notice is the function that creates β and if you want, also sends β any of the standard file notices. the whole squad is here: Created, Deleted, Moved, Reverted, Saved, and Modified. all six, no cap π«Ά
it builds a notice with the op and scope you hand it, and sets its file attribute to pathname. then, per the Desktop messaging conventions (iykyk), it adds an unset argument of Tt_mode TT_IN and vtype File to the notice. iconic behavior honestly.
now the fun part: if send_and_destroy is True, it sends the message and then destroys it. if not, it only creates the message. that's the whole toggle π₯
the context argument is the environment to use. if context is not zero, messages created by ttdt_file_notice inherit from context all contexts whose slotname begins with the characters ENV_. she's copying the environment vibes, periodt.
π RETURN VALUE π
if send_and_destroy is False, you get back the created Tt_message. if send_and_destroy is True, it returns zero; otherwise, it returns an error pointer π
the application can use tt_ptr_error(3) to extract one of the following Tt_status values from the returned handle:
TT_DESKTOP_EINVALβ theopargument wasTTDT_MOVEDandsend_and_destroywasTrue. yeah, that combo isn't it πTT_ERR_DBAVAILβ the ToolTalk service could not access the ToolTalk database needed for this operation.TT_ERR_DBEXISTβ the ToolTalk service could not access the specified ToolTalk database in the expected place.TT_ERR_NOMEMβ there is insufficient memory available to perform the function. she's out of brain cells, relatable π₯²TT_ERR_NOMPβ thettsession(1)process is not running and the ToolTalk service cannot restart it.TT_ERR_OVERFLOWβ the ToolTalk service has more active messages than it can handle. (the maximum number of active messages is implementation specific, but is at least2000.) she's at capacity, bestie πTT_ERR_POINTERβ thepathnameargument wasNULLor was a ToolTalk error pointer.TT_ERR_PROCIDβ the specified process identifier is out of date or invalid.
π APPLICATION USAGE π
okay real talk: ttdt_file_event is the higher-level interface than ttdt_file_notice, and it's the preferred way to send all but the Moved notice. so like... use that one unless you're doing the Moved thing. main character energy for ttdt_file_event, fr fr β
π SEE ALSO π
Tt/tttk.hβTttttk(5)ttdt_file_event(3)
π§ and that's the tea, bestie β go forth and make notices β¨
and we're out! that was ttdt_file_notice from the library call manual section β the original footer just circles back to the same ttdt_file_notice(library call) line with no extra source, version, or date info attached, so consider this your cute little sign-off instead ππ
π¦ where this page comes from
- nixos 26.05: cde 2.5.3
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms