php-internal-docs
8.4.8
Unofficial docs for php/php-src
Loading...
Searching...
No Matches
tar.h
Go to the documentation of this file.
1
#ifndef __PHAR_TAR_H
2
#define __PHAR_TAR_H
3
/*
4
+----------------------------------------------------------------------+
5
| TAR archive support for Phar |
6
+----------------------------------------------------------------------+
7
| Copyright (c) The PHP Group |
8
+----------------------------------------------------------------------+
9
| This source file is subject to version 3.01 of the PHP license, |
10
| that is bundled with this package in the file LICENSE, and is |
11
| available through the world-wide-web at the following url: |
12
| https://www.php.net/license/3_01.txt |
13
| If you did not receive a copy of the PHP license and are unable to |
14
| obtain it through the world-wide-web, please send a note to |
15
| license@php.net so we can mail you a copy immediately. |
16
+----------------------------------------------------------------------+
17
| Authors: Dmitry Stogov <dmitry@php.net> |
18
| Gregory Beaver <cellog@php.net> |
19
+----------------------------------------------------------------------+
20
*/
21
22
#ifdef PHP_WIN32
23
#pragma pack(1)
24
# define PHAR_TAR_PACK
25
#elif defined(__sgi)
26
# define PHAR_TAR_PACK
27
#elif defined(__GNUC__)
28
# define PHAR_TAR_PACK __attribute__((__packed__))
29
#else
30
# define PHAR_TAR_PACK
31
#endif
32
33
#if defined(__sgi)
34
# pragma pack 0
35
#endif
40
typedef
struct
_old_tar_header
{
/* {{{ */
41
char
name
[100];
/* name of file;
42
directory is indicated by a trailing slash (/) */
43
char
mode
[8];
/* file mode */
44
char
uid
[8];
/* owner user ID */
45
char
gid
[8];
/* owner group ID */
46
char
size
[12];
/* length of file in bytes */
47
char
mtime
[12];
/* modify time of file */
48
char
checksum
[8];
/* checksum for header */
49
char
link
;
/* indicator for links;
50
1 for a linked file,
51
2 for a symbolic link,
52
0 otherwise */
53
char
linkname
[100];
/* name of linked file */
54
}
PHAR_TAR_PACK
old_tar_header
;
55
/* }}} */
56
57
#if defined(__sgi)
58
# pragma pack 0
59
#endif
65
typedef
struct
_tar_header
{
/* {{{ */
66
char
name
[100];
/* name of file */
67
char
mode
[8];
/* file mode */
68
char
uid
[8];
/* owner user ID */
69
char
gid
[8];
/* owner group ID */
70
char
size
[12];
/* length of file in bytes */
71
char
mtime
[12];
/* modify time of file */
72
char
checksum
[8];
/* checksum for header */
73
char
typeflag
;
/* type of file
74
0 Regular file
75
1 Link to another file already archived
76
2 Symbolic link
77
3 Character special device
78
4 Block special device
79
5 Directory
80
6 FIFO special file
81
7 Reserved */
82
char
linkname
[100];
/* name of linked file */
83
char
magic
[6];
/* USTAR indicator */
84
char
version
[2];
/* USTAR version */
85
char
uname
[32];
/* owner user name */
86
char
gname
[32];
/* owner group name */
87
char
devmajor
[8];
/* device major number */
88
char
devminor
[8];
/* device minor number */
89
char
prefix
[155];
/* prefix for file name;
90
the value of the prefix field, if non-null,
91
is prefixed to the name field to allow names
92
longer then 100 characters */
93
char
padding
[12];
/* unused zeroed bytes */
94
}
PHAR_TAR_PACK
tar_header
;
95
/* }}} */
96
97
#ifdef PHP_WIN32
98
#pragma pack()
99
#endif
100
101
#endif
/* __PHAR_TAR_H */
tar_header
struct _tar_header tar_header
old_tar_header
struct _old_tar_header old_tar_header
PHAR_TAR_PACK
#define PHAR_TAR_PACK
Definition
tar.h:30
_old_tar_header
Definition
tar.h:40
_old_tar_header::link
char link
Definition
tar.h:49
_old_tar_header::mode
char mode[8]
Definition
tar.h:43
_old_tar_header::mtime
char mtime[12]
Definition
tar.h:47
_old_tar_header::name
char name[100]
Definition
tar.h:41
_old_tar_header::uid
char uid[8]
Definition
tar.h:44
_old_tar_header::gid
char gid[8]
Definition
tar.h:45
_old_tar_header::linkname
char linkname[100]
Definition
tar.h:53
_old_tar_header::checksum
char checksum[8]
Definition
tar.h:48
_old_tar_header::size
char size[12]
Definition
tar.h:46
_tar_header
Definition
tar.h:65
_tar_header::mode
char mode[8]
Definition
tar.h:67
_tar_header::name
char name[100]
Definition
tar.h:66
_tar_header::uid
char uid[8]
Definition
tar.h:68
_tar_header::typeflag
char typeflag
Definition
tar.h:73
_tar_header::linkname
char linkname[100]
Definition
tar.h:82
_tar_header::devmajor
char devmajor[8]
Definition
tar.h:87
_tar_header::devminor
char devminor[8]
Definition
tar.h:88
_tar_header::checksum
char checksum[8]
Definition
tar.h:72
_tar_header::mtime
char mtime[12]
Definition
tar.h:71
_tar_header::gid
char gid[8]
Definition
tar.h:69
_tar_header::prefix
char prefix[155]
Definition
tar.h:89
_tar_header::version
char version[2]
Definition
tar.h:84
_tar_header::padding
char padding[12]
Definition
tar.h:93
_tar_header::size
char size[12]
Definition
tar.h:70
_tar_header::gname
char gname[32]
Definition
tar.h:86
_tar_header::uname
char uname[32]
Definition
tar.h:85
_tar_header::magic
char magic[6]
Definition
tar.h:83
ext
phar
tar.h
Generated on Sat Aug 23 2025 01:46:08 for php-internal-docs by
1.13.2