TT_FILE_DESTROY(3)

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

πŸ’… tt_file_destroy

okay so this is tt_file_destroy, a library call in the ToolTalk manual set, and it's literally the cleanup bestie you call when a file or directory is about to leave the chat πŸ’…βœ¨


🌸 NAME 🌸

tt_file_destroy β€” remove objected rooted on a file (that's the page's exact phrasing, bestie 🫢).

🌈 SYNOPSIS 🌈

#include &<Tt/tt_c.h>
Tt_status tt_file_destroy(
const char *filepath);

πŸŽ€ DESCRIPTION πŸŽ€

The tt_file_destroy function removes all objects that exist on the files and directories rooted at filepath. No cap: all of them. The application must call this function when the application unlinks a file or removes a directory πŸ”₯.

The filepath argument is a pointer to the pathname of the file or directory to be removed.

bestie, this is the "I'm deleting the thing, pls clean up the ToolTalk objects rooted there" call. You don't skip it 😭

πŸ’– RETURN VALUE πŸ’–

Upon successful completion, the tt_file_destroy function returns the status of the operation as one of the following Tt_status values:

  • TT_OK β€” The operation completed successfully. slay βœ…
  • TT_ERR_ACCESS β€” The user does not have the necessary access to the object and/or the process.
  • 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. It does not appear to exist; administrative action is required. (admin girlies, assemble 🫑)
  • TT_ERR_FILE β€” The specified file does not exist or it is inaccessible.
  • TT_ERR_NOMP β€” The ttsession(1) process is not running and the ToolTalk service cannot restart it.
  • TT_ERR_PATH β€” The specified pathname included an unsearchable directory.
  • TT_ERR_POINTER β€” The pointer passed does not point to an object of the correct type for this operation.

πŸ¦‹ SEE ALSO πŸ¦‹


source/version + date tea β˜•: the footer names tt_file_destroy and the library call manual, and gives no date, so that's the whole cute sign-off, bestie πŸ«ΆπŸ’œβœ¨

πŸ“¦ where this page comes from