PaxTarEntry 构造函数

定义

重载

PaxTarEntry(TarEntry)

通过将指定的other条目转换为 PAX 格式来初始化新PaxTarEntry实例。

PaxTarEntry(TarEntryType, String)

使用指定的条目类型和条目名称以及默认的扩展属性初始化新 PaxTarEntry 实例。

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

使用指定的条目类型、条目名称和扩展属性枚举初始化新 PaxTarEntry 实例。

PaxTarEntry(TarEntry)

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

通过将指定的other条目转换为 PAX 格式来初始化新PaxTarEntry实例。

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)

参数

other
TarEntry

TarEntry 转换为 PAX 格式的实例。

例外

other 是实例 PaxGlobalExtendedAttributesTarEntry

-或-

PAX 格式不支持 的 other 条目类型。

适用于

PaxTarEntry(TarEntryType, String)

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

使用指定的条目类型和条目名称以及默认的扩展属性初始化新 PaxTarEntry 实例。

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)

参数

entryType
TarEntryType

条目的类型。

entryName
String

包含此项的路径和文件名的字符串。

例外

entryNamenull

entryName 为空。

- 或 -

不支持以 PAX 格式创建条目类型。

注解

使用 PaxTarEntry(TarEntryType, String) 构造函数创建实例时,仅支持以下条目类型:Directory、、HardLinkSymbolicLinkRegularFileBlockDeviceCharacterDeviceFifo

创建条目时, PaxTarEntry(TarEntryType, String, IEnumerable<KeyValuePair<String,String>>) 使用 构造函数包含其他扩展属性。

始终在任何 PAX 条目的扩展属性字典中找到以下条目:

  • 修改时间,在 名称 mtime下,作为数字 Double
  • 访问时间,名称 atime下为 数字 Double
  • 在名称 ctime下更改时间,作为 Double 数字。
  • 路径,在 名称 path下,作为字符串。

仅当满足某些条件时,才在 PAX 条目的扩展属性字典中找到以下条目:

  • 如果组名称大于 32 个字节, gname则以字符串的形式命名。
  • 如果用户名大于 32 个字节,则名称下 uname为 字符串。
  • 如果数字的 size字符串表示形式大于 12 个 Int32字节,则文件名为 。

适用于

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

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

使用指定的条目类型、条目名称和扩展属性枚举初始化新 PaxTarEntry 实例。

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)))

参数

entryType
TarEntryType

条目的类型。

entryName
String

包含此项的路径和文件名的字符串。

extendedAttributes
IEnumerable<KeyValuePair<String,String>>

字符串键值对的枚举,表示要包含在当前条目之前的扩展属性条目中的元数据。

例外

extendedAttributesentryNamenull

entryName 为空。

- 或 -

不支持以 PAX 格式创建条目类型。

注解

创建条目时,使用此构造函数包含其他扩展属性。

始终在任何 PAX 条目的扩展属性字典中找到以下条目:

  • 修改时间,在 名称 mtime下,作为数字 Double
  • 访问时间,名称 atime下为 数字 Double
  • 在名称 ctime下更改时间,作为 Double 数字。
  • 路径,在 名称 path下,作为字符串。

仅当满足某些条件时,才在 PAX 条目的扩展属性字典中找到以下条目:

  • 如果组名称大于 32 个字节, gname则以字符串的形式命名。
  • 如果用户名大于 32 个字节,则名称下 uname为 字符串。
  • 如果数字的 size字符串表示形式大于 12 个 Int32字节,则文件名为 。

适用于