Mercurial > vba-linux
view src/win32/7zip/7z/CPP/7zip/Archive/Tar/TarHeader.h @ 1:f9f4f1b99eed
importing src directory
author | Robert McIntyre <rlm@mit.edu> |
---|---|
date | Sat, 03 Mar 2012 10:31:27 -0600 |
parents | |
children |
line wrap: on
line source
1 // Archive/Tar/Header.h3 #ifndef __ARCHIVE_TAR_HEADER_H4 #define __ARCHIVE_TAR_HEADER_H6 #include "Common/Types.h"8 namespace NArchive {9 namespace NTar {11 namespace NFileHeader12 {13 const int kRecordSize = 512;14 const int kNameSize = 100;15 const int kUserNameSize = 32;16 const int kGroupNameSize = 32;17 const int kPrefixSize = 155;19 /*20 struct CHeader21 {22 char Name[kNameSize];23 char Mode[8];24 char UID[8];25 char GID[8];26 char Size[12];27 char ModificationTime[12];28 char CheckSum[8];29 char LinkFlag;30 char LinkName[kNameSize];31 char Magic[8];32 char UserName[kUserNameSize];33 char GroupName[kGroupNameSize];34 char DeviceMajor[8];35 char DeviceMinor[8];36 char Prefix[155];37 };38 union CRecord39 {40 CHeader Header;41 Byte Padding[kRecordSize];42 };43 */45 namespace NMode46 {47 const int kSetUID = 04000; // Set UID on execution48 const int kSetGID = 02000; // Set GID on execution49 const int kSaveText = 01000; // Save text (sticky bit)50 }52 namespace NFilePermissions53 {54 const int kUserRead = 00400; // read by owner55 const int kUserWrite = 00200; // write by owner56 const int kUserExecute = 00100; // execute/search by owner57 const int kGroupRead = 00040; // read by group58 const int kGroupWrite = 00020; // write by group59 const int kGroupExecute = 00010; // execute/search by group60 const int kOtherRead = 00004; // read by other61 const int kOtherWrite = 00002; // write by other62 const int kOtherExecute = 00001; // execute/search by other63 }66 // The linkflag defines the type of file67 namespace NLinkFlag68 {69 const char kOldNormal = '\0'; // Normal disk file, Unix compatible70 const char kNormal = '0'; // Normal disk file71 const char kLink = '1'; // Link to previously dumped file72 const char kSymbolicLink = '2'; // Symbolic link73 const char kCharacter = '3'; // Character special file74 const char kBlock = '4'; // Block special file75 const char kDirectory = '5'; // Directory76 const char kFIFO = '6'; // FIFO special file77 const char kContiguous = '7'; // Contiguous file79 const char kDumpDir = 'D'; /* GNUTYPE_DUMPDIR.80 data: list of files created by the --incremental (-G) option81 Each file name is preceded by either82 - 'Y' (file should be in this archive)83 - 'N' (file is a directory, or is not stored in the archive.)84 Each file name is terminated by a null + an additional null after85 the last file name. */87 }88 // Further link types may be defined later.90 // The checksum field is filled with this while the checksum is computed.91 extern const char *kCheckSumBlanks;// = " "; // 8 blanks, no null93 extern const char *kLongLink; // = "././@LongLink";94 extern const char *kLongLink2; // = "@LongLink";96 // The magic field is filled with this if uname and gname are valid.97 namespace NMagic98 {99 extern const char *kUsTar; // = "ustar"; // 5 chars100 extern const char *kGNUTar; // = "GNUtar "; // 7 chars and a null101 extern const char *kEmpty; // = "GNUtar "; // 7 chars and a null102 }104 }106 }}108 #endif