FREEBSD::FILE_UP(3)
πΈ NAME πΈ
okay so this is the FREEBSD::FILE_UP(3) page, bestie β and it's literally about freebsd::FILE_up, the std::unique_ptr specialization for stdio FILE objects. No cap, that's the whole name vibe. π
π LIBRARY π
library βlibutil++β β yep, that's the one, bestie. π«Ά
β¨ SYNOPSIS β¨
#include <libutil++.hh>
using FILE_up = std::unique_ptr<FILE, fclose_deleter>;
π DESCRIPTION π
This class is a specialization of std::unique_ptr for stdio FILE objects. Iconic behavior, honestly. β¨
When a FILE object managed by an instance of this class is disposed, fclose(3) is invoked to dispose of the FILE object. That's it. That's the slay. π
π§ͺ EXAMPLES π§ͺ
freebsd::FILE_up fp(fopen("foo.txt", "w"));
if (!fp)
err(1, "fopen");
fprintf(fp.get(), "hello0);
// `fp' is implicitly closed on destruction
π₯ SEE ALSO π₯
Cute sign-off time, bestie: this one comes from Debian, dated July 31, 2025 β source/version and date, all accounted for, periodt. ππ¦
π¦ where this page comes from
- freebsd 15.1: base 15.1
- π the page's license: BSD-2-Clause
- Copyright (c) 2025 Chelsio Communications, Inc
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms