109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
|
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
|
-
+
|
_type = header[156];
targetFileName = stringFromBuffer(header + 157, 100, encoding);
if (targetFileName.length > 0)
_targetFileName = [targetFileName copy];
if (_type == '\0')
_type = OF_TAR_ARCHIVE_ENTRY_TYPE_FILE;
_type = OFTarArchiveEntryTypeFile;
if (memcmp(header + 257, "ustar\0" "00", 8) == 0) {
OFString *prefix;
_owner = [stringFromBuffer(header + 265, 32, encoding)
copy];
_group = [stringFromBuffer(header + 297, 32, encoding)
|
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
|
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
|
-
+
|
- (instancetype)initWithFileName: (OFString *)fileName
{
self = [super init];
@try {
_fileName = [fileName copy];
_type = OF_TAR_ARCHIVE_ENTRY_TYPE_FILE;
_type = OFTarArchiveEntryTypeFile;
_mode = 0644;
} @catch (id e) {
[self release];
@throw e;
}
return self;
|
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
|
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
|
-
+
|
}
- (OFDate *)modificationDate
{
return _modificationDate;
}
- (of_tar_archive_entry_type_t)type
- (OFTarArchiveEntryType)type
{
return _type;
}
- (OFString *)targetFileName
{
return _targetFileName;
|