ARCHIVE_ENTRY_TIME(3)
π ARCHIVE_ENTRY_TIME β the libarchive time-manipulation girlies π
okay bestie, welcome to ARCHIVE_ENTRY_TIME(3), a page straight out of the Library Functions Manual. this is the one where we learn how to read and write every single timestamp living inside an archive_entry, and honestly? it's giving time lord. π°οΈβ¨
πΈ NAME πΈ
archive_entry_atime, archive_entry_atime_nsec, archive_entry_atime_is_set, archive_entry_set_atime, archive_entry_unset_atime, archive_entry_birthtime, archive_entry_birthtime_nsec, archive_entry_birthtime_is_set, archive_entry_set_birthtime, archive_entry_unset_birthtime, archive_entry_ctime, archive_entry_ctime_nsec, archive_entry_ctime_is_set, archive_entry_set_ctime, archive_entry_unset_ctime, archive_entry_mtime, archive_entry_mtime_nsec, archive_entry_mtime_is_set, archive_entry_set_mtime, archive_entry_unset_mtime β literally all the functions for manipulating times in archive entry descriptions π
π LIBRARY π
Streaming Archive Library (libarchive, -larchive)
β¨ SYNOPSIS β¨
#include <archive_entry.h>
time_t
archive_entry_atime(struct archive_entry *a);
long
archive_entry_atime_nsec(struct archive_entry *a);
int
archive_entry_atime_is_set(struct archive_entry *a);
void
archive_entry_set_atime(struct archive_entry *a, time_t sec,
long nanosec);
void
archive_entry_unset_atime(struct archive_entry *a);
time_t
archive_entry_birthtime(struct archive_entry *a);
long
archive_entry_birthtime_nsec(struct archive_entry *a);
int
archive_entry_birthtime_is_set(struct archive_entry *a);
void
archive_entry_set_birthtime(struct archive_entry *a, time_t sec,
long nanosec);
void
archive_entry_unset_birthtime(struct archive_entry *a);
time_t
archive_entry_ctime(struct archive_entry *a);
long
archive_entry_ctime_nsec(struct archive_entry *a);
int
archive_entry_ctime_is_set(struct archive_entry *a);
void
archive_entry_set_ctime(struct archive_entry *a, time_t sec,
long nanosec);
void
archive_entry_unset_ctime(struct archive_entry *a);
time_t
archive_entry_mtime(struct archive_entry *a);
long
archive_entry_mtime_nsec(struct archive_entry *a);
int
archive_entry_mtime_is_set(struct archive_entry *a);
void
archive_entry_set_mtime(struct archive_entry *a, time_t sec,
long nanosec);
void
archive_entry_unset_mtime(struct archive_entry *a);
π¦ DESCRIPTION π¦
so these functions create and manipulate the time fields inside an archive_entry. the time fields we're working with are:
- atime β access time, aka the last time somebody looked at it π
- birthtime β creation time, its literal birthday π
- ctime β the last time an inode property was changed
- mtime β modification time, the last time its content got edited βοΈ
libarchive(3) serves a high-resolution interface, no cap. the timestamps get truncated automatically depending on the archive format (when you're archiving) or the filesystem capabilities (when you're restoring). so like, the precision you ask for isn't always the precision you get β that's just the vibe. π«Ά
every single timestamp field is optional. the XXX_unset() functions are your besties here: call one to mark the corresponding field as missing. wanna know the current state? hit up XXX_is_set(). and heads up β unset time fields have a second field and a nanosecond field of 0. periodt. π
π SEE ALSO π
archive_entry(3), libarchive(3)
π HISTORY π
the libarchive library first appeared in FreeBSD 5.3. a true icon from day one, no notes. π
π AUTHORS π
the libarchive library was written by Tim Kientzle <kientzle@acm.org>. king behavior honestly. π
and that's the whole page bestie!! this little writeup came to you from Debian, dated February 2, 2012 β ARCHIVE_ENTRY_TIME(3), Library Functions Manual, iykyk. go forth and set some timestamps. slay. π
β¨ππ¦
π¦ where this page comes from
- freebsd 14.5: base 14.5
- freebsd 15.1: base 15.1
- Copyright (c) 2003-2007 Tim Kientzle
- Copyright (c) 2010 Joerg Sonnenberger
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms