Main index | Section 3 | Options |
#include <archive_entry.h>
The function archive_entry_copy_stat() copies fields from the platform's struct stat. Fields not provided by struct stat are unchanged.
AE_IFREG | Regular file |
AE_IFLNK | Symbolic link |
AE_IFSOCK | |
Socket | |
AE_IFCHR | Character device |
AE_IFBLK | Block device |
AE_IFDIR | Directory |
AE_IFIFO | Named pipe (fifo) |
The functions archive_entry_mode() and archive_entry_set_mode() get/set a combination of file type and permissions and provide the equivalent of st_mode. Use of archive_entry_filetype() and archive_entry_perm() for getting and archive_entry_set_filetype() and archive_entry_set_perm() for setting is recommended.
The function archive_entry_size() returns the file size, if it has been set, and 0 otherwise. archive_entry_size() can be used to query that status. archive_entry_set_size() and archive_entry_unset_size() set and unset the size, respectively.
The number of references (hardlinks) can be obtained by calling archive_entry_nlink() and set with archive_entry_set_nlink().
The device major and minor number can be obtained independently using archive_entry_devmajor() and archive_entry_devminor(). The device can be set either via archive_entry_set_dev() or by the combination of major and minor number using archive_entry_set_devmajor() and archive_entry_set_devminor().
The inode number can be obtained using archive_entry_ino(). This is a legacy interface that uses the platform ino_t, which may be very small. To set the inode number, archive_entry_set_ino64() is the preferred interface.
The process of splitting the combined device number into major and minor number and the reverse process of combing them differs between platforms. Some archive formats use the combined form, while other formats use the split form.
ARCHIVE_ENTRY_STAT (3) | February 2, 2012 |
Main index | Section 3 | Options |
Please direct any comments about this manual page service to Ben Bullock. Privacy policy.
“ | As soon as we started programming, we found to our surprise that it wasn't as easy to get programs right as we had thought. Debugging had to be discovered. I can remember the exact instant when I realized that a large part of my life from then on was going to be spent in finding mistakes in my own programs. | ” |
— Maurice Wilkes |