hdf_copy(3)

πŸ’– hdf_copy β€” from the util/neo_hdf.h girlies, manual section 3 πŸ’–

okay bestie, sit down, hydrate, and let me tell you about the single most underrated little function in the whole HDF universe: hdf_copy. yes it's a section 3 manual page, yes it lives in util/neo_hdf.h, and yes it is lowkey doing the most while acting like it's doing nothing. let's get into it. πŸ¦‹


✨ NAME ✨

hdf_copy β€” copy part of an HDF dataset to another. that's it. that's the whole vibe. copy part. to another. slay.


🌸 SYNOPSIS 🌸

#include <util/neo_hdf.h>

NEOERR* hdf_copy (HDF *dest_hdf, const char *name, HDF *src);

look at her. three args, returns a NEOERR*. no notes. πŸ‘‘


πŸŽ€ ARGUMENTS πŸŽ€

  • dest_hdf β€” the destination dataset. this is where the copy is gonna live, like moving into a new apartment. 🏠
  • name β€” the name of the destination node. it's the little name tag for where the copied tree lands. 🏷️
  • src β€” the hdf dataset to copy to the destination. the source of truth, the origin story, the one being duplicated. πŸ“‹

πŸ’… DESCRIPTION πŸ’…

okay so the tea is: hdf_copy is a deep copy of an HDF tree pointed to by src to the named node of dest.

the way that it's deep means it's not just a shallow little link situation β€” it's the whole tree, all the way down. no shortcuts, no "we'll do the children later", it is committing. periodt. πŸ’…

and the plot twist that makes her iconic: dest and src need not be part of the same data set. they can be total strangers, different trees, different vibes entirely. she does not care. she copies anyway. 🫢


πŸ”₯ RETURN VALUE πŸ”₯

None.

literally none. she returns None in the docs, and the function signature says NEOERR*. that's the energy. don't ask, just check your NEOERR. 😭


🌈 SEE ALSO 🌈

the whole friend group, in the order the original gave them, no cap:


and that's the page, bestie. this one came from ClearSilver, dated 12 July 2007, and it's manual section 3, page hdf_copy(3) β€” so go forth, deep copy responsibly, and remember: dest and src don't even have to know each other. iconic behavior fr fr. πŸ’–βœ¨