using System; using AMWD.Common.Packing.Tar.Utils; namespace AMWD.Common.Packing.Tar.Interfaces { /// /// See "struct star_header" in /// public interface ITarHeader { /// /// The name field is the file name of the file, with directory names (if any) preceding the file name, /// separated by slashes. /// /// /// name ///
/// Byte offset: 0 ///
string FileName { get; set; } /// /// The mode field provides nine bits specifying file permissions and three bits to specify /// the Set UID, Set GID, and Save Text (sticky) modes. /// When special permissions are required to create a file with a given mode, /// and the user restoring files from the archive does not hold such permissions, /// the mode bit(s) specifying those special permissions are ignored. /// Modes which are not supported by the operating system restoring files from the archive will be ignored. /// Unsupported modes should be faked up when creating or updating an archive; e.g., /// the group permission could be copied from the other permission. /// /// /// mode ///
/// Byte offset: 100 ///
int Mode { get; set; } /// /// The uid field is the numeric user ID of the file owners. /// If the operating system does not support numeric user ID, this field should be ignored. /// /// /// uid ///
/// Byte offset: 108 ///
int UserId { get; set; } /// /// The gid fields is the numeric group ID of the file owners. /// If the operating system does not support numeric group ID, this field should be ignored. /// /// /// gid ///
/// Byte offset: 116 ///
int GroupId { get; set; } /// /// The size field is the size of the file in bytes; /// linked files are archived with this field specified as zero. /// /// /// size ///
/// Byte offset: 124 ///
long SizeInBytes { get; set; } /// /// mtime /// byte offset: 136 /// The mtime field represents the data modification time of the file at the time it was archived. /// It represents the integer number of seconds since January 1, 1970, 00:00 Coordinated Universal Time. /// /// /// mtime ///
/// Byte offset: 136 ///
DateTime LastModification { get; set; } /// /// The typeflag field specifies the type of file archived. /// If a particular implementation does not recognize or permit the specified type, /// the file will be extracted as if it were a regular file. /// As this action occurs, tar issues a warning to the standard error. /// /// /// typeflag ///
/// Byte offset: 156 ///
EntryType EntryType { get; set; } /// /// The uname field will contain the ASCII representation of the owner of the file. /// If found, the user ID is used rather than the value in the uid field. /// /// /// uname ///
/// Byte offset: 265 ///
string UserName { get; set; } /// /// The gname field will contain the ASCII representation of the group of the file. /// If found, the group ID is used rather than the values in the gid field. /// /// /// gname ///
/// Byte offset: 297 ///
string GroupName { get; set; } /// /// The size of this header. /// int HeaderSize { get; } } }