archive_entry_mtime(3)

archive_entry_mtime3

Functions for manipulating times in archive entry descriptions

Part of archive_entry_time(3).

Usage

#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);

Library

Streaming Archive Library (libarchive, -larchive)

Overview

These functions create and manipulate the time fields in an archive_entry. Supported time fields are atime (access time), birthtime (creation time), ctime (last time an inode property was changed) and mtime (modification time).

libarchive(3) provides a high-resolution interface. The timestamps are truncated automatically depending on the archive format (for archiving) or the filesystem capabilities (for restoring).

All timestamp fields are optional. The XXX_unset() functions can be used to mark the corresponding field as missing. The current state can be queried using XXX_is_set(). Unset time fields have a second and nanosecond field of 0.

Releases

52 releases since FreeBSD 5.3-RELEASE; the text changed 27 times.

  1. 5.3–5.4
  2. 5.5
  3. 6.0–6.1
  4. 6.2
  5. 6.3
  6. 6.4
  7. 7.0
  8. 7.1
  9. 7.2
  10. 7.3
  11. 7.4
  12. 8.0
  13. 8.1
  14. 8.2
  15. 8.3
  16. 8.4
  17. 9.0
  18. 9.1
  19. 9.2
  20. 9.3
  21. 10.0–10.3
  22. 10.4–11.3
  23. 11.4
  24. 12.0–12.1
  25. 12.2–13.3
  26. 13.4–13.5
  27. 14.0
  28. 14.1–16.0

History

The libarchive library first appeared in FreeBSD 5.3.

Authors

The libarchive library was written by Tim Kientzle ⟨[email protected]⟩.

From base 16.0-CURRENT-20261027-61c70dc16a79 in FreeBSD 16.0-CURRENT (2026-10-27). Parsed by carta from the page's mdoc source.