Bewerken

Share via


PaxTarEntry Constructors

Definition

Overloads

PaxTarEntry(TarEntry)

Initializes a new PaxTarEntry instance by converting the specified other entry into the PAX format.

PaxTarEntry(TarEntryType, String)

Initializes a new PaxTarEntry instance with the specified entry type and entry name, and the default extended attributes.

PaxTarEntry(TarEntryType, String, IEnumerable<KeyValuePair<String,String>>)

Initializes a new PaxTarEntry instance with the specified entry type, entry name, and extended attributes enumeration.

PaxTarEntry(TarEntry)

Source:
PaxTarEntry.cs
Source:
PaxTarEntry.cs
Source:
PaxTarEntry.cs

Initializes a new PaxTarEntry instance by converting the specified other entry into the PAX format.

public:
 PaxTarEntry(System::Formats::Tar::TarEntry ^ other);
public PaxTarEntry (System.Formats.Tar.TarEntry other);
new System.Formats.Tar.PaxTarEntry : System.Formats.Tar.TarEntry -> System.Formats.Tar.PaxTarEntry
Public Sub New (other As TarEntry)

Parameters

other
TarEntry

The TarEntry instance to convert to the PAX format.

Exceptions

other is a PaxGlobalExtendedAttributesTarEntry instance.

-or-

The entry type of other is not supported in the PAX format.

Applies to

PaxTarEntry(TarEntryType, String)

Source:
PaxTarEntry.cs
Source:
PaxTarEntry.cs
Source:
PaxTarEntry.cs

Initializes a new PaxTarEntry instance with the specified entry type and entry name, and the default extended attributes.

public:
 PaxTarEntry(System::Formats::Tar::TarEntryType entryType, System::String ^ entryName);
public PaxTarEntry (System.Formats.Tar.TarEntryType entryType, string entryName);
new System.Formats.Tar.PaxTarEntry : System.Formats.Tar.TarEntryType * string -> System.Formats.Tar.PaxTarEntry
Public Sub New (entryType As TarEntryType, entryName As String)

Parameters

entryType
TarEntryType

The type of the entry.

entryName
String

A string with the path and file name of this entry.

Exceptions

entryName is null.

entryName is empty.

-or-

The entry type is not supported for creating an entry in the PAX format.

Remarks

When creating an instance using the PaxTarEntry(TarEntryType, String) constructor, only the following entry types are supported: Directory, HardLink, SymbolicLink, RegularFile, BlockDevice, CharacterDevice, and Fifo.

Use the PaxTarEntry(TarEntryType, String, IEnumerable<KeyValuePair<String,String>>) constructor to include additional extended attributes when creating the entry.

The following entries are always found in the extended attributes dictionary of any PAX entry:

  • Modification time, under the name mtime, as a Double number.
  • Access time, under the name atime, as a Double number.
  • Change time, under the name ctime, as a Double number.
  • Path, under the name path, as a string.

The following entries are only found in the extended attributes dictionary of a PAX entry if certain conditions are met:

  • Group name, under the name gname, as a string, if it is larger than 32 bytes.
  • User name, under the name uname, as a string, if it is larger than 32 bytes.
  • File length, under the name size, as an Int32, if the string representation of the number is larger than 12 bytes.

Applies to

PaxTarEntry(TarEntryType, String, IEnumerable<KeyValuePair<String,String>>)

Source:
PaxTarEntry.cs
Source:
PaxTarEntry.cs
Source:
PaxTarEntry.cs

Initializes a new PaxTarEntry instance with the specified entry type, entry name, and extended attributes enumeration.

public:
 PaxTarEntry(System::Formats::Tar::TarEntryType entryType, System::String ^ entryName, System::Collections::Generic::IEnumerable<System::Collections::Generic::KeyValuePair<System::String ^, System::String ^>> ^ extendedAttributes);
public PaxTarEntry (System.Formats.Tar.TarEntryType entryType, string entryName, System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<string,string>> extendedAttributes);
new System.Formats.Tar.PaxTarEntry : System.Formats.Tar.TarEntryType * string * seq<System.Collections.Generic.KeyValuePair<string, string>> -> System.Formats.Tar.PaxTarEntry
Public Sub New (entryType As TarEntryType, entryName As String, extendedAttributes As IEnumerable(Of KeyValuePair(Of String, String)))

Parameters

entryType
TarEntryType

The type of the entry.

entryName
String

A string with the path and file name of this entry.

extendedAttributes
IEnumerable<KeyValuePair<String,String>>

An enumeration of string key-value pairs that represents the metadata to include in the extended attributes entry that precedes the current entry.

Exceptions

extendedAttributes or entryName is null.

entryName is empty.

-or-

The entry type is not supported for creating an entry in the PAX format.

Remarks

Use this constructor to include additional extended attributes when creating the entry.

The following entries are always found in the extended attributes dictionary of any PAX entry:

  • Modification time, under the name mtime, as a Double number.
  • Access time, under the name atime, as a Double number.
  • Change time, under the name ctime, as a Double number.
  • Path, under the name path, as a string.

The following entries are only found in the extended attributes dictionary of a PAX entry if certain conditions are met:

  • Group name, under the name gname, as a string, if it is larger than 32 bytes.
  • User name, under the name uname, as a string, if it is larger than 32 bytes.
  • File length, under the name size, as an Int32, if the string representation of the number is larger than 12 bytes.

Applies to