tb_property_copy_dir(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… tb_property_copy_dir β€” the Kernel API Manual, bestie edition πŸ¦‹

okay so real talk, this one lives in tb_property_copy_dir(9) and it does exactly one thing but it does it so well. Think of it as the ultimate dupe β€” it looks at a directory and goes "mine now" and gives you a whole separate copy. main character energy fr fr.


✨ NAME ✨

tb_property_copy_dir β€” takes a deep copy of a directory. not a shallow little peek, a deep copy, meaning everything inside gets duplicated too. no shared vibes, no borrowed references. separate. independent. iconic πŸ‘‘


🌸 SYNOPSIS 🌸

struct tb_property_dir * tb_property_copy_dir (const struct
tb_property_dir *dir );

πŸŽ€ ARGUMENTS πŸŽ€

  • dir β€” the directory you wanna copy. that's it. that's the whole ask. 🫢

πŸ’– DESCRIPTION πŸ’–

so you call this, you get a fresh new struct tb_property_dir that's a full deep copy of dir. slay.

⚠️ but bestie listen β€” the resulting directory needs to be released by calling tb_property_free_dir. do NOT just leave it lying around. that's a memory leak and we don't do that here. clean up after yourself, it's giving responsible. 🧹✨

🌈 RETURN 🌈

  • returns a pointer to struct tb_property_dir β€” yay, you got your copy! πŸŽ‰
  • returns NULL in case of failure β€” 😭 it happens, check your return value, no cap.

πŸ¦‹ SEE ALSO πŸ¦‹

Kernel file ./drivers/thunderbolt/property.c

and the whole friend group:


⭐ and that's the tea, bestie! this page came to you straight outta ./drivers/thunderbolt, dated October 2026, and it's filed under the good ol' tb_property_copy_dir(9) name. go forth, deep copy responsibly, and remember to free your dirs. mwah πŸ’‹πŸŽ€

πŸ“¦ where this page comes from