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:
[legend]
Collaboration diagram for ICSharpCode.SharpZipLib.Tar.TarHeader:
[legend]

## 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 | ) |
| static private

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

Parameters

  buffer | The 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

  obj | The 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

  toAdd | The string to add
  nameOffset | The offset of the first character to add.
  buffer | The buffer to add to.
  bufferOffset | The offset to start adding at.
  length | The 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 )
| static private

Add the checksum integer to header buffer.

Parameters

  value |
  buffer | The header buffer to set the checksum for
  offset | The offset into the buffer for the checksum
  length | The 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 | ) |
| static private

Here is the caller graph for this function:

## ◆ GetDateTimeFromCTime()

DateTime ICSharpCode.SharpZipLib.Tar.TarHeader.GetDateTimeFromCTime | ( | long | ticks | ) |
| static private

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

  value | Value to be convert to octal
  buffer | The buffer to update
  offset | The offset into the buffer to store the value
  length | The 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

  name | The name to add
  buffer | The buffer to add to
  offset | The offset into the buffer from which to start adding
  length | The 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

  name | The name to add
  nameOffset | The offset of the first character
  buffer | The buffer to add to
  bufferOffset | The index of the first byte to add
  length | The 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

  name | The name to add
  buffer | The buffer to add to
  offset | The offset into the buffer from which to start adding
  length | The 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

  name | The name to add
  nameOffset | The offset of the first character
  buffer | The buffer to add to
  bufferOffset | The index of the first byte to add
  length | The 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

  value | the value to be converted to octal
  buffer | buffer to store the octal string
  offset | The offset into the buffer where the value starts
  length | The 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 | ) |
| static private

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

Parameters

  buffer | The 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

  header | The 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

  header | The header buffer from which to parse.
  offset | The offset into the buffer from which to parse.
  length | The 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

  header | The header buffer from which to parse.
  offset | The offset into the buffer from which to parse.
  length | The number of header bytes to parse.

Returns
  The long equivalent of the octal string.

## ◆ RestoreSetValues()

void ICSharpCode.SharpZipLib.Tar.TarHeader.RestoreSetValues | ( |  | ) |
| static package

Here is the caller graph for this function:

## ◆ SetValueDefaults()

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

Set defaults for values used when constructing a TarHeader instance.

Parameters

  userId | Value to apply as a default for userId.
  userName | Value to apply as a default for userName.
  groupId | Value to apply as a default for groupId.
  groupName | Value 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

  outBuffer | output 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)
| static private

## ◆ defaultGroupId

int ICSharpCode.SharpZipLib.Tar.TarHeader.defaultGroupId
| static package

## ◆ defaultGroupName

string ICSharpCode.SharpZipLib.Tar.TarHeader.defaultGroupName = "None"
| static package

## ◆ defaultUser

string ICSharpCode.SharpZipLib.Tar.TarHeader.defaultUser
| static package

## ◆ defaultUserId

int ICSharpCode.SharpZipLib.Tar.TarHeader.defaultUserId
| static package

## ◆ 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
| static package

## ◆ groupName

string ICSharpCode.SharpZipLib.Tar.TarHeader.groupName
| private

## ◆ groupNameAsSet

string ICSharpCode.SharpZipLib.Tar.TarHeader.groupNameAsSet = "None"
| static package

## ◆ 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
| static private

## ◆ 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
| static package

## ◆ userName

string ICSharpCode.SharpZipLib.Tar.TarHeader.userName
| private

## ◆ userNameAsSet

string ICSharpCode.SharpZipLib.Tar.TarHeader.userNameAsSet
| static package

## ◆ 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
| get set

Get/set the entry's major device number.

## ◆ DevMinor

int ICSharpCode.SharpZipLib.Tar.TarHeader.DevMinor
| get set

Get/set the entry's minor device number.

## ◆ GroupId

int ICSharpCode.SharpZipLib.Tar.TarHeader.GroupId
| get set

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
| get set

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
| get set

The entry's link name.

Exceptions

  ArgumentNullException | Thrown when attempting to set LinkName to null.

## ◆ Magic

string ICSharpCode.SharpZipLib.Tar.TarHeader.Magic
| get set

Get/set the entry's magic tag.

Exceptions

  ArgumentNullException | Thrown when attempting to set Magic to null.

## ◆ Mode

int ICSharpCode.SharpZipLib.Tar.TarHeader.Mode
| get set

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

## ◆ ModTime

DateTime ICSharpCode.SharpZipLib.Tar.TarHeader.ModTime
| get set

Get/set the entry's modification time.

The modification time is only accurate to within a second.

Exceptions

  ArgumentOutOfRangeException | Thrown when setting the date time to less than 1/1/1970.

## ◆ Name

string ICSharpCode.SharpZipLib.Tar.TarHeader.Name
| get set

Get/set the name for this tar entry.

Exceptions

  ArgumentNullException | Thrown when attempting to set the property to null.

## ◆ Size

long ICSharpCode.SharpZipLib.Tar.TarHeader.Size
| get set

Get/set the entry's size.

Exceptions

  ArgumentOutOfRangeException | Thrown when setting the size to less than zero.

## ◆ TypeFlag

byte ICSharpCode.SharpZipLib.Tar.TarHeader.TypeFlag
| get set

Get/set the entry's type flag.

## ◆ UserId

int ICSharpCode.SharpZipLib.Tar.TarHeader.UserId
| get set

The entry's user id.

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

## ◆ UserName

string ICSharpCode.SharpZipLib.Tar.TarHeader.UserName
| get set

The entry's user name.

## ◆ Version

string ICSharpCode.SharpZipLib.Tar.TarHeader.Version
| get set

The entry's version.

Exceptions

  ArgumentNullException | Thrown when attempting to set Version to null.

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

- ICSharpCode.SharpZLib/Tar/TarHeader.cs