3 #ifndef __ARCHIVE_TAR_ITEM_H
4 #define __ARCHIVE_TAR_ITEM_H
8 #include "Common/Types.h"
9 #include "Common/MyString.h"
11 #include "../Common/ItemNameUtils.h"
12 #include "TarHeader.h"
25 UInt32 ModificationTime;
32 bool DeviceMajorDefined;
34 bool DeviceMinorDefined;
37 bool IsDirectory() const
39 if (LinkFlag == NFileHeader::NLinkFlag::kDirectory)
41 if (LinkFlag == NFileHeader::NLinkFlag::kOldNormal ||
42 LinkFlag == NFileHeader::NLinkFlag::kNormal)
44 return NItemName::HasTailSlash(Name, CP_OEMCP);
51 for (int i = 0; i < 5; i++)
52 if (Magic[i] != NFileHeader::NMagic::kUsTar[i])
58 class CItemEx: public CItem
61 UInt64 HeaderPosition;
63 UInt64 GetDataPosition() const { return HeaderPosition + LongLinkSize + NFileHeader::kRecordSize; };
64 UInt64 GetFullSize() const { return LongLinkSize + NFileHeader::kRecordSize + Size; };