Fingerprint_Card
Loading...
Searching...
No Matches
ICSharpCode.SharpZipLib.Tar.TarHeader Class Reference

This class encapsulates the Tar Entry Header used in Tar Archives. The class also holds a number of tar constants, used mostly in headers. More...

Inheritance diagram for ICSharpCode.SharpZipLib.Tar.TarHeader:
Collaboration diagram for ICSharpCode.SharpZipLib.Tar.TarHeader:

Public Member Functions

 TarHeader ()
 Initialise a default TarHeader instance.
string GetName ()
 Get the name of this entry.
object Clone ()
 Create a new TarHeader that is a copy of the current instance.
void ParseBuffer (byte[] header)
 Parse TarHeader information from a header buffer.
void WriteHeader (byte[] outBuffer)
 'Write' header information to buffer provided, updating the check sum.
override int GetHashCode ()
 Get a hash code for the current object.
override bool Equals (object obj)
 Determines if this instance is equal to the specified object.

Static Public Member Functions

static long ParseOctal (byte[] header, int offset, int length)
 Parse an octal string from a header buffer.
static StringBuilder ParseName (byte[] header, int offset, int length)
 Parse a name from a header buffer.
static int GetNameBytes (StringBuilder name, int nameOffset, byte[] buffer, int bufferOffset, int length)
 Add name name to the buffer as a collection of bytes.
static int GetNameBytes (string name, int nameOffset, byte[] buffer, int bufferOffset, int length)
 Add name name to the buffer as a collection of bytes.
static int GetNameBytes (StringBuilder name, byte[] buffer, int offset, int length)
 Add an entry name to the buffer.
static int GetNameBytes (string name, byte[] buffer, int offset, int length)
 Add an entry name to the buffer.
static int GetAsciiBytes (string toAdd, int nameOffset, byte[] buffer, int bufferOffset, int length)
 Add a string to a buffer as a collection of ascii bytes.
static int GetOctalBytes (long value, byte[] buffer, int offset, int length)
 Put an octal representation of a value into a buffer.
static int GetLongOctalBytes (long value, byte[] buffer, int offset, int length)
 Put an octal representation of a value into a buffer.

Static Public Attributes

const int NAMELEN = 100
 The length of the name field in a header buffer.
const int MODELEN = 8
 The length of the mode field in a header buffer.
const int UIDLEN = 8
 The length of the user id field in a header buffer.
const int GIDLEN = 8
 The length of the group id field in a header buffer.
const int CHKSUMLEN = 8
 The length of the checksum field in a header buffer.
const int CHKSUMOFS = 148
 Offset of checksum in a header buffer.
const int SIZELEN = 12
 The length of the size field in a header buffer.
const int MAGICLEN = 6
 The length of the magic field in a header buffer.
const int VERSIONLEN = 2
 The length of the version field in a header buffer.
const int MODTIMELEN = 12
 The length of the modification time field in a header buffer.
const int UNAMELEN = 32
 The length of the user name field in a header buffer.
const int GNAMELEN = 32
 The length of the group name field in a header buffer.
const int DEVLEN = 8
 The length of the devices field in a header buffer.
const byte LF_OLDNORM = 0
 The "old way" of indicating a normal file.
const byte LF_NORMAL = (byte) '0'
 Normal file type.
const byte LF_LINK = (byte) '1'
 Link file type.
const byte LF_SYMLINK = (byte) '2'
 Symbolic link file type.
const byte LF_CHR = (byte) '3'
 Character device file type.
const byte LF_BLK = (byte) '4'
 Block device file type.
const byte LF_DIR = (byte) '5'
 Directory file type.
const byte LF_FIFO = (byte) '6'
 FIFO (pipe) file type.
const byte LF_CONTIG = (byte) '7'
 Contiguous file type.
const byte LF_GHDR = (byte) 'g'
 Posix.1 2001 global extended header.
const byte LF_XHDR = (byte) 'x'
 Posix.1 2001 extended header.
const byte LF_ACL = (byte) 'A'
 Solaris access control list file type.
const byte LF_GNU_DUMPDIR = (byte) 'D'
 GNU dir dump file type This is a dir entry that contains the names of files that were in the dir at the time the dump was made.
const byte LF_EXTATTR = (byte) 'E'
 Solaris Extended Attribute File.
const byte LF_META = (byte) 'I'
 Inode (metadata only) no file content.
const byte LF_GNU_LONGLINK = (byte) 'K'
 Identifies the next file on the tape as having a long link name.
const byte LF_GNU_LONGNAME = (byte) 'L'
 Identifies the next file on the tape as having a long name.
const byte LF_GNU_MULTIVOL = (byte) 'M'
 Continuation of a file that began on another volume.
const byte LF_GNU_NAMES = (byte) 'N'
 For storing filenames that dont fit in the main header (old GNU)
const byte LF_GNU_SPARSE = (byte) 'S'
 GNU Sparse file.
const byte LF_GNU_VOLHDR = (byte) 'V'
 GNU Tape/volume header ignore on extraction.
const string TMAGIC = "ustar "
 The magic tag representing a POSIX tar archive. (includes trailing NULL)
const string GNU_TMAGIC = "ustar "
 The magic tag representing an old GNU tar archive where version is included in magic and overwrites it.

Static Package Functions

static void SetValueDefaults (int userId, string userName, int groupId, string groupName)
 Set defaults for values used when constructing a TarHeader instance.
static void RestoreSetValues ()

Static Package Attributes

static int userIdAsSet
static int groupIdAsSet
static string userNameAsSet
static string groupNameAsSet = "None"
static int defaultUserId
static int defaultGroupId
static string defaultGroupName = "None"
static string defaultUser

Properties

string Name [get, set]
 Get/set the name for this tar entry.
int Mode [get, set]
 Get/set the entry's Unix style permission mode.
int UserId [get, set]
 The entry's user id.
int GroupId [get, set]
 Get/set the entry's group id.
long Size [get, set]
 Get/set the entry's size.
DateTime ModTime [get, set]
 Get/set the entry's modification time.
int Checksum [get]
 Get the entry's checksum. This is only valid/updated after writing or reading an entry.
bool IsChecksumValid [get]
 Get value of true if the header checksum is valid, false otherwise.
byte TypeFlag [get, set]
 Get/set the entry's type flag.
string LinkName [get, set]
 The entry's link name.
string Magic [get, set]
 Get/set the entry's magic tag.
string Version [get, set]
 The entry's version.
string UserName [get, set]
 The entry's user name.
string GroupName [get, set]
 Get/set the entry's group name.
int DevMajor [get, set]
 Get/set the entry's major device number.
int DevMinor [get, set]
 Get/set the entry's minor device number.

Static Private Member Functions

static int GetCheckSumOctalBytes (long value, byte[] buffer, int offset, int length)
 Add the checksum integer to header buffer.
static int ComputeCheckSum (byte[] buffer)
 Compute the checksum for a tar entry header.
The checksum field must be all spaces prior to this happening.
static int MakeCheckSum (byte[] buffer)
 Make a checksum for a tar entry ignoring the checksum contents.
static int GetCTime (System.DateTime dateTime)
static DateTime GetDateTimeFromCTime (long ticks)

Private Attributes

string name
int mode
int userId
int groupId
long size
DateTime modTime
int checksum
bool isChecksumValid
byte typeFlag
string linkName
string magic
string version
string userName
string groupName
int devMajor
int devMinor

Static Private Attributes

const long timeConversionFactor = 10000000L
static readonly DateTime dateTime1970 = new DateTime(1970, 1, 1, 0, 0, 0, 0)

Detailed Description

This class encapsulates the Tar Entry Header used in Tar Archives. The class also holds a number of tar constants, used mostly in headers.

Constructor & Destructor Documentation

◆ TarHeader()

ICSharpCode.SharpZipLib.Tar.TarHeader.TarHeader ( )

Initialise a default TarHeader instance.

Here is the caller graph for this function:

Member Function Documentation

◆ Clone()

object ICSharpCode.SharpZipLib.Tar.TarHeader.Clone ( )

Create a new TarHeader that is a copy of the current instance.

Returns
A new Object that is a copy of the current instance.

◆ ComputeCheckSum()

int ICSharpCode.SharpZipLib.Tar.TarHeader.ComputeCheckSum ( byte[] buffer)
staticprivate

Compute the checksum for a tar entry header.
The checksum field must be all spaces prior to this happening.

Parameters
bufferThe tar entry's header buffer.
Returns
The computed checksum.
Here is the caller graph for this function:

◆ Equals()

override bool ICSharpCode.SharpZipLib.Tar.TarHeader.Equals ( object obj)

Determines if this instance is equal to the specified object.

Parameters
objThe object to compare with.
Returns
true if the objects are equal, false otherwise.
Here is the call graph for this function:

◆ GetAsciiBytes()

int ICSharpCode.SharpZipLib.Tar.TarHeader.GetAsciiBytes ( string toAdd,
int nameOffset,
byte[] buffer,
int bufferOffset,
int length )
static

Add a string to a buffer as a collection of ascii bytes.

Parameters
toAddThe string to add
nameOffsetThe offset of the first character to add.
bufferThe buffer to add to.
bufferOffsetThe offset to start adding at.
lengthThe number of ascii characters to add.
Returns
The next free index in the buffer.
Here is the caller graph for this function:

◆ GetCheckSumOctalBytes()

int ICSharpCode.SharpZipLib.Tar.TarHeader.GetCheckSumOctalBytes ( long value,
byte[] buffer,
int offset,
int length )
staticprivate

Add the checksum integer to header buffer.

Parameters
value
bufferThe header buffer to set the checksum for
offsetThe offset into the buffer for the checksum
lengthThe number of header bytes to update. It's formatted differently from the other fields: it has 6 digits, a null, then a space – rather than digits, a space, then a null. The final space is already there, from checksumming
Returns
The modified buffer offset
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetCTime()

int ICSharpCode.SharpZipLib.Tar.TarHeader.GetCTime ( System.DateTime dateTime)
staticprivate
Here is the caller graph for this function:

◆ GetDateTimeFromCTime()

DateTime ICSharpCode.SharpZipLib.Tar.TarHeader.GetDateTimeFromCTime ( long ticks)
staticprivate
Here is the caller graph for this function:

◆ GetHashCode()

override int ICSharpCode.SharpZipLib.Tar.TarHeader.GetHashCode ( )

Get a hash code for the current object.

Returns
A hash code for the current object.

◆ GetLongOctalBytes()

int ICSharpCode.SharpZipLib.Tar.TarHeader.GetLongOctalBytes ( long value,
byte[] buffer,
int offset,
int length )
static

Put an octal representation of a value into a buffer.

Parameters
valueValue to be convert to octal
bufferThe buffer to update
offsetThe offset into the buffer to store the value
lengthThe length of the octal string
Returns
Index of next byte
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetName()

string ICSharpCode.SharpZipLib.Tar.TarHeader.GetName ( )

Get the name of this entry.

Returns
The entry's name.

◆ GetNameBytes() [1/4]

int ICSharpCode.SharpZipLib.Tar.TarHeader.GetNameBytes ( string name,
byte[] buffer,
int offset,
int length )
static

Add an entry name to the buffer.

Parameters
nameThe name to add
bufferThe buffer to add to
offsetThe offset into the buffer from which to start adding
lengthThe number of header bytes to add
Returns
The index of the next free byte in the buffer
Here is the call graph for this function:

◆ GetNameBytes() [2/4]

int ICSharpCode.SharpZipLib.Tar.TarHeader.GetNameBytes ( string name,
int nameOffset,
byte[] buffer,
int bufferOffset,
int length )
static

Add name name to the buffer as a collection of bytes.

Parameters
nameThe name to add
nameOffsetThe offset of the first character
bufferThe buffer to add to
bufferOffsetThe index of the first byte to add
lengthThe number of characters/bytes to add
Returns
The next free index in the buffer

◆ GetNameBytes() [3/4]

int ICSharpCode.SharpZipLib.Tar.TarHeader.GetNameBytes ( StringBuilder name,
byte[] buffer,
int offset,
int length )
static

Add an entry name to the buffer.

Parameters
nameThe name to add
bufferThe buffer to add to
offsetThe offset into the buffer from which to start adding
lengthThe number of header bytes to add
Returns
The index of the next free byte in the buffer
Here is the call graph for this function:

◆ GetNameBytes() [4/4]

int ICSharpCode.SharpZipLib.Tar.TarHeader.GetNameBytes ( StringBuilder name,
int nameOffset,
byte[] buffer,
int bufferOffset,
int length )
static

Add name name to the buffer as a collection of bytes.

Parameters
nameThe name to add
nameOffsetThe offset of the first character
bufferThe buffer to add to
bufferOffsetThe index of the first byte to add
lengthThe number of characters/bytes to add
Returns
The next free index in the buffer
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetOctalBytes()

int ICSharpCode.SharpZipLib.Tar.TarHeader.GetOctalBytes ( long value,
byte[] buffer,
int offset,
int length )
static

Put an octal representation of a value into a buffer.

Parameters
valuethe value to be converted to octal
bufferbuffer to store the octal string
offsetThe offset into the buffer where the value starts
lengthThe length of the octal string to create
Returns
The offset of the character next byte after the octal string
Here is the caller graph for this function:

◆ MakeCheckSum()

int ICSharpCode.SharpZipLib.Tar.TarHeader.MakeCheckSum ( byte[] buffer)
staticprivate

Make a checksum for a tar entry ignoring the checksum contents.

Parameters
bufferThe tar entry's header buffer.
Returns
The checksum for the buffer
Here is the call graph for this function:

◆ ParseBuffer()

void ICSharpCode.SharpZipLib.Tar.TarHeader.ParseBuffer ( byte[] header)

Parse TarHeader information from a header buffer.

Parameters
headerThe tar entry header buffer to get information from.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ParseName()

StringBuilder ICSharpCode.SharpZipLib.Tar.TarHeader.ParseName ( byte[] header,
int offset,
int length )
static

Parse a name from a header buffer.

Parameters
headerThe header buffer from which to parse.
offsetThe offset into the buffer from which to parse.
lengthThe number of header bytes to parse.
Returns
The name parsed.
Here is the caller graph for this function:

◆ ParseOctal()

long ICSharpCode.SharpZipLib.Tar.TarHeader.ParseOctal ( byte[] header,
int offset,
int length )
static

Parse an octal string from a header buffer.

Parameters
headerThe header buffer from which to parse.
offsetThe offset into the buffer from which to parse.
lengthThe number of header bytes to parse.
Returns
The long equivalent of the octal string.

◆ RestoreSetValues()

void ICSharpCode.SharpZipLib.Tar.TarHeader.RestoreSetValues ( )
staticpackage
Here is the caller graph for this function:

◆ SetValueDefaults()

void ICSharpCode.SharpZipLib.Tar.TarHeader.SetValueDefaults ( int userId,
string userName,
int groupId,
string groupName )
staticpackage

Set defaults for values used when constructing a TarHeader instance.

Parameters
userIdValue to apply as a default for userId.
userNameValue to apply as a default for userName.
groupIdValue to apply as a default for groupId.
groupNameValue to apply as a default for groupName.
Here is the caller graph for this function:

◆ WriteHeader()

void ICSharpCode.SharpZipLib.Tar.TarHeader.WriteHeader ( byte[] outBuffer)

'Write' header information to buffer provided, updating the check sum.

Parameters
outBufferoutput buffer for header information
Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ checksum

int ICSharpCode.SharpZipLib.Tar.TarHeader.checksum
private

◆ CHKSUMLEN

const int ICSharpCode.SharpZipLib.Tar.TarHeader.CHKSUMLEN = 8
static

The length of the checksum field in a header buffer.

◆ CHKSUMOFS

const int ICSharpCode.SharpZipLib.Tar.TarHeader.CHKSUMOFS = 148
static

Offset of checksum in a header buffer.

◆ dateTime1970

readonly DateTime ICSharpCode.SharpZipLib.Tar.TarHeader.dateTime1970 = new DateTime(1970, 1, 1, 0, 0, 0, 0)
staticprivate

◆ defaultGroupId

int ICSharpCode.SharpZipLib.Tar.TarHeader.defaultGroupId
staticpackage

◆ defaultGroupName

string ICSharpCode.SharpZipLib.Tar.TarHeader.defaultGroupName = "None"
staticpackage

◆ defaultUser

string ICSharpCode.SharpZipLib.Tar.TarHeader.defaultUser
staticpackage

◆ defaultUserId

int ICSharpCode.SharpZipLib.Tar.TarHeader.defaultUserId
staticpackage

◆ DEVLEN

const int ICSharpCode.SharpZipLib.Tar.TarHeader.DEVLEN = 8
static

The length of the devices field in a header buffer.

◆ devMajor

int ICSharpCode.SharpZipLib.Tar.TarHeader.devMajor
private

◆ devMinor

int ICSharpCode.SharpZipLib.Tar.TarHeader.devMinor
private

◆ GIDLEN

const int ICSharpCode.SharpZipLib.Tar.TarHeader.GIDLEN = 8
static

The length of the group id field in a header buffer.

◆ GNAMELEN

const int ICSharpCode.SharpZipLib.Tar.TarHeader.GNAMELEN = 32
static

The length of the group name field in a header buffer.

◆ GNU_TMAGIC

const string ICSharpCode.SharpZipLib.Tar.TarHeader.GNU_TMAGIC = "ustar "
static

The magic tag representing an old GNU tar archive where version is included in magic and overwrites it.

◆ groupId

int ICSharpCode.SharpZipLib.Tar.TarHeader.groupId
private

◆ groupIdAsSet

int ICSharpCode.SharpZipLib.Tar.TarHeader.groupIdAsSet
staticpackage

◆ groupName

string ICSharpCode.SharpZipLib.Tar.TarHeader.groupName
private

◆ groupNameAsSet

string ICSharpCode.SharpZipLib.Tar.TarHeader.groupNameAsSet = "None"
staticpackage

◆ isChecksumValid

bool ICSharpCode.SharpZipLib.Tar.TarHeader.isChecksumValid
private

◆ LF_ACL

const byte ICSharpCode.SharpZipLib.Tar.TarHeader.LF_ACL = (byte) 'A'
static

Solaris access control list file type.

◆ LF_BLK

const byte ICSharpCode.SharpZipLib.Tar.TarHeader.LF_BLK = (byte) '4'
static

Block device file type.

◆ LF_CHR

const byte ICSharpCode.SharpZipLib.Tar.TarHeader.LF_CHR = (byte) '3'
static

Character device file type.

◆ LF_CONTIG

const byte ICSharpCode.SharpZipLib.Tar.TarHeader.LF_CONTIG = (byte) '7'
static

Contiguous file type.

◆ LF_DIR

const byte ICSharpCode.SharpZipLib.Tar.TarHeader.LF_DIR = (byte) '5'
static

Directory file type.

◆ LF_EXTATTR

const byte ICSharpCode.SharpZipLib.Tar.TarHeader.LF_EXTATTR = (byte) 'E'
static

Solaris Extended Attribute File.

◆ LF_FIFO

const byte ICSharpCode.SharpZipLib.Tar.TarHeader.LF_FIFO = (byte) '6'
static

FIFO (pipe) file type.

◆ LF_GHDR

const byte ICSharpCode.SharpZipLib.Tar.TarHeader.LF_GHDR = (byte) 'g'
static

Posix.1 2001 global extended header.

◆ LF_GNU_DUMPDIR

const byte ICSharpCode.SharpZipLib.Tar.TarHeader.LF_GNU_DUMPDIR = (byte) 'D'
static

GNU dir dump file type This is a dir entry that contains the names of files that were in the dir at the time the dump was made.

◆ LF_GNU_LONGLINK

const byte ICSharpCode.SharpZipLib.Tar.TarHeader.LF_GNU_LONGLINK = (byte) 'K'
static

Identifies the next file on the tape as having a long link name.

◆ LF_GNU_LONGNAME

const byte ICSharpCode.SharpZipLib.Tar.TarHeader.LF_GNU_LONGNAME = (byte) 'L'
static

Identifies the next file on the tape as having a long name.

◆ LF_GNU_MULTIVOL

const byte ICSharpCode.SharpZipLib.Tar.TarHeader.LF_GNU_MULTIVOL = (byte) 'M'
static

Continuation of a file that began on another volume.

◆ LF_GNU_NAMES

const byte ICSharpCode.SharpZipLib.Tar.TarHeader.LF_GNU_NAMES = (byte) 'N'
static

For storing filenames that dont fit in the main header (old GNU)

◆ LF_GNU_SPARSE

const byte ICSharpCode.SharpZipLib.Tar.TarHeader.LF_GNU_SPARSE = (byte) 'S'
static

GNU Sparse file.

◆ LF_GNU_VOLHDR

const byte ICSharpCode.SharpZipLib.Tar.TarHeader.LF_GNU_VOLHDR = (byte) 'V'
static

GNU Tape/volume header ignore on extraction.

◆ LF_LINK

const byte ICSharpCode.SharpZipLib.Tar.TarHeader.LF_LINK = (byte) '1'
static

Link file type.

◆ LF_META

const byte ICSharpCode.SharpZipLib.Tar.TarHeader.LF_META = (byte) 'I'
static

Inode (metadata only) no file content.

◆ LF_NORMAL

const byte ICSharpCode.SharpZipLib.Tar.TarHeader.LF_NORMAL = (byte) '0'
static

Normal file type.

◆ LF_OLDNORM

const byte ICSharpCode.SharpZipLib.Tar.TarHeader.LF_OLDNORM = 0
static

The "old way" of indicating a normal file.

◆ LF_SYMLINK

const byte ICSharpCode.SharpZipLib.Tar.TarHeader.LF_SYMLINK = (byte) '2'
static

Symbolic link file type.

◆ LF_XHDR

const byte ICSharpCode.SharpZipLib.Tar.TarHeader.LF_XHDR = (byte) 'x'
static

Posix.1 2001 extended header.

◆ linkName

string ICSharpCode.SharpZipLib.Tar.TarHeader.linkName
private

◆ magic

string ICSharpCode.SharpZipLib.Tar.TarHeader.magic
private

◆ MAGICLEN

const int ICSharpCode.SharpZipLib.Tar.TarHeader.MAGICLEN = 6
static

The length of the magic field in a header buffer.

◆ mode

int ICSharpCode.SharpZipLib.Tar.TarHeader.mode
private

◆ MODELEN

const int ICSharpCode.SharpZipLib.Tar.TarHeader.MODELEN = 8
static

The length of the mode field in a header buffer.

◆ modTime

DateTime ICSharpCode.SharpZipLib.Tar.TarHeader.modTime
private

◆ MODTIMELEN

const int ICSharpCode.SharpZipLib.Tar.TarHeader.MODTIMELEN = 12
static

The length of the modification time field in a header buffer.

◆ name

string ICSharpCode.SharpZipLib.Tar.TarHeader.name
private

◆ NAMELEN

const int ICSharpCode.SharpZipLib.Tar.TarHeader.NAMELEN = 100
static

The length of the name field in a header buffer.

◆ size

long ICSharpCode.SharpZipLib.Tar.TarHeader.size
private

◆ SIZELEN

const int ICSharpCode.SharpZipLib.Tar.TarHeader.SIZELEN = 12
static

The length of the size field in a header buffer.

◆ timeConversionFactor

const long ICSharpCode.SharpZipLib.Tar.TarHeader.timeConversionFactor = 10000000L
staticprivate

◆ TMAGIC

const string ICSharpCode.SharpZipLib.Tar.TarHeader.TMAGIC = "ustar "
static

The magic tag representing a POSIX tar archive. (includes trailing NULL)

◆ typeFlag

byte ICSharpCode.SharpZipLib.Tar.TarHeader.typeFlag
private

◆ UIDLEN

const int ICSharpCode.SharpZipLib.Tar.TarHeader.UIDLEN = 8
static

The length of the user id field in a header buffer.

◆ UNAMELEN

const int ICSharpCode.SharpZipLib.Tar.TarHeader.UNAMELEN = 32
static

The length of the user name field in a header buffer.

◆ userId

int ICSharpCode.SharpZipLib.Tar.TarHeader.userId
private

◆ userIdAsSet

int ICSharpCode.SharpZipLib.Tar.TarHeader.userIdAsSet
staticpackage

◆ userName

string ICSharpCode.SharpZipLib.Tar.TarHeader.userName
private

◆ userNameAsSet

string ICSharpCode.SharpZipLib.Tar.TarHeader.userNameAsSet
staticpackage

◆ version

string ICSharpCode.SharpZipLib.Tar.TarHeader.version
private

◆ VERSIONLEN

const int ICSharpCode.SharpZipLib.Tar.TarHeader.VERSIONLEN = 2
static

The length of the version field in a header buffer.

Property Documentation

◆ Checksum

int ICSharpCode.SharpZipLib.Tar.TarHeader.Checksum
get

Get the entry's checksum. This is only valid/updated after writing or reading an entry.

◆ DevMajor

int ICSharpCode.SharpZipLib.Tar.TarHeader.DevMajor
getset

Get/set the entry's major device number.

◆ DevMinor

int ICSharpCode.SharpZipLib.Tar.TarHeader.DevMinor
getset

Get/set the entry's minor device number.

◆ GroupId

int ICSharpCode.SharpZipLib.Tar.TarHeader.GroupId
getset

Get/set the entry's group id.

This is only directly relevant to linux/unix systems. The default value is zero.

◆ GroupName

string ICSharpCode.SharpZipLib.Tar.TarHeader.GroupName
getset

Get/set the entry's group name.

This is only directly relevant to unix systems.

◆ IsChecksumValid

bool ICSharpCode.SharpZipLib.Tar.TarHeader.IsChecksumValid
get

Get value of true if the header checksum is valid, false otherwise.

◆ LinkName

string ICSharpCode.SharpZipLib.Tar.TarHeader.LinkName
getset

The entry's link name.

Exceptions
ArgumentNullExceptionThrown when attempting to set LinkName to null.

◆ Magic

string ICSharpCode.SharpZipLib.Tar.TarHeader.Magic
getset

Get/set the entry's magic tag.

Exceptions
ArgumentNullExceptionThrown when attempting to set Magic to null.

◆ Mode

int ICSharpCode.SharpZipLib.Tar.TarHeader.Mode
getset

Get/set the entry's Unix style permission mode.

◆ ModTime

DateTime ICSharpCode.SharpZipLib.Tar.TarHeader.ModTime
getset

Get/set the entry's modification time.

The modification time is only accurate to within a second.

Exceptions
ArgumentOutOfRangeExceptionThrown when setting the date time to less than 1/1/1970.

◆ Name

string ICSharpCode.SharpZipLib.Tar.TarHeader.Name
getset

Get/set the name for this tar entry.

Exceptions
ArgumentNullExceptionThrown when attempting to set the property to null.

◆ Size

long ICSharpCode.SharpZipLib.Tar.TarHeader.Size
getset

Get/set the entry's size.

Exceptions
ArgumentOutOfRangeExceptionThrown when setting the size to less than zero.

◆ TypeFlag

byte ICSharpCode.SharpZipLib.Tar.TarHeader.TypeFlag
getset

Get/set the entry's type flag.

◆ UserId

int ICSharpCode.SharpZipLib.Tar.TarHeader.UserId
getset

The entry's user id.

This is only directly relevant to unix systems. The default is zero.

◆ UserName

string ICSharpCode.SharpZipLib.Tar.TarHeader.UserName
getset

The entry's user name.

◆ Version

string ICSharpCode.SharpZipLib.Tar.TarHeader.Version
getset

The entry's version.

Exceptions
ArgumentNullExceptionThrown when attempting to set Version to null.

The documentation for this class was generated from the following file: