Skip to content

Commit 8313f62

Browse files
committed
System.Formats.Tar docs
1 parent 141b049 commit 8313f62

File tree

3 files changed

+9
-4
lines changed

3 files changed

+9
-4
lines changed

xml/System.Formats.Tar/GnuTarEntry.xml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,9 @@
4848
<Docs>
4949
<param name="other">The <see cref="T:System.Formats.Tar.TarEntry" /> instance to convert to the GNU format.</param>
5050
<summary>Initializes a new <see cref="T:System.Formats.Tar.GnuTarEntry" /> instance by converting the specified <paramref name="other" /> entry into the GNU format.</summary>
51-
<remarks>To be added.</remarks>
51+
<remarks>
52+
<para>When creating an instance of <see cref="T:System.Formats.Tar.GnuTarEntry" /> using this constructor, if <paramref name="other" /> is <see cref="F:System.Formats.Tar.TarEntryFormat.Gnu" /> or <see cref="F:System.Formats.Tar.TarEntryFormat.Pax" />, then the <see cref="P:System.Formats.Tar.GnuTarEntry.AccessTime" /> and <see cref="P:System.Formats.Tar.GnuTarEntry.ChangeTime" /> properties are set to the same values set in <paramref name="other" />. But if <paramref name="other" /> is of any other format, then <see cref="P:System.Formats.Tar.GnuTarEntry.AccessTime" /> and <see cref="P:System.Formats.Tar.GnuTarEntry.ChangeTime" /> are set to <see langword="default" />, which in the entry header <c>atime</c> and <c>ctime</c> fields is written as <see langword="null" /> bytes. This ensures compatibility with other tools that are unable to read the <c>atime</c> and <c>ctime</c> in <see cref="F:System.Formats.Tar.TarEntryFormat.Gnu" /> entries, as these two fields are not POSIX compatible because other formats expect the <c>prefix</c> field in the same header location where <see cref="F:System.Formats.Tar.TarEntryFormat.Gnu" /> writes <c>atime</c> and <c>ctime</c>.</para>
53+
</remarks>
5254
<exception cref="T:System.ArgumentException">
5355
<paramref name="other" /> is a <see cref="T:System.Formats.Tar.PaxGlobalExtendedAttributesTarEntry" /> instance.
5456

xml/System.Formats.Tar/PaxTarEntry.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
<Docs>
4949
<param name="other">The <see cref="T:System.Formats.Tar.TarEntry" /> instance to convert to the PAX format.</param>
5050
<summary>Initializes a new <see cref="T:System.Formats.Tar.PaxTarEntry" /> instance by converting the specified <paramref name="other" /> entry into the PAX format.</summary>
51-
<remarks>To be added.</remarks>
51+
<remarks>When converting a <see cref="T:System.Formats.Tar.GnuTarEntry" /> to <see cref="T:System.Formats.Tar.PaxTarEntry" /> using this constructor, the <see cref="P:System.Formats.Tar.GnuTarEntry.AccessTime" /> and <see cref="P:System.Formats.Tar.GnuTarEntry.ChangeTime" /> values will get transfered to the <see cref="P:System.Formats.Tar.PaxTarEntry.ExtendedAttributes" /> dictionary only if their values are not <see langword="default" /> (which is <see cref="F:System.DateTimeOffset.MinValue" />).</remarks>
5252
<exception cref="T:System.ArgumentException">
5353
<paramref name="other" /> is a <see cref="T:System.Formats.Tar.PaxGlobalExtendedAttributesTarEntry" /> instance.
5454

xml/System.Formats.Tar/TarWriter.xml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@
8585
<param name="leaveOpen">
8686
<see langword="false" /> to dispose the <paramref name="archiveStream" /> when this instance is disposed; <see langword="true" /> to leave the stream open.</param>
8787
<summary>Initializes a <see cref="T:System.Formats.Tar.TarWriter" /> instance that can write tar entries to the specified stream and optionally leaves the stream open upon disposal of this instance. When using this constructor, the format of the resulting archive is <see cref="F:System.Formats.Tar.TarEntryFormat.Pax" />.</summary>
88-
<remarks>To be added.</remarks>
88+
<remarks>The <see cref="F:System.Formats.Tar.TarEntryFormat.Pax" /> format is the default format as it is the most flexible and POSIX compatible. This is the only format with which <see cref="T:System.Formats.Tar.TarWriter" /> reads and stores <c>atime</c> and <c>ctime</c> when creating entries from filesystem entries.</remarks>
8989
<exception cref="T:System.ArgumentNullException">
9090
<paramref name="archiveStream" /> is <see langword="null" />.</exception>
9191
<exception cref="T:System.ArgumentException">
@@ -297,7 +297,10 @@ These are the entry types supported for writing on each format:
297297
<param name="fileName">The path to the file to write to the archive.</param>
298298
<param name="entryName">The name of the file as it should be represented in the archive. It should include the optional relative path and the filename.</param>
299299
<summary>Writes the specified file into the archive stream as a tar entry.</summary>
300-
<remarks>To be added.</remarks>
300+
<remarks>
301+
<para>The entry will be created using the format specified in the <see cref="M:System.Formats.Tar.TarWriter.#ctor(System.IO.Stream,System.Formats.Tar.TarEntryFormat,System.Boolean)" /> constructor, or will use <see cref="F:System.Formats.Tar.TarEntryFormat.Pax" /> if other constructors are used.</para>
302+
<para>If the format is <see cref="F:System.Formats.Tar.TarEntryFormat.Pax" />, the <c>atime</c> and <c>ctime</c> from the file will be stored in the <see cref="P:System.Formats.Tar.PaxTarEntry.ExtendedAttributes" /> dictionary. If the format is <see cref="F:System.Formats.Tar.TarEntryFormat.Gnu" />, this method will not set a value for <see cref="P:System.Formats.Tar.GnuTarEntry.AccessTime" /> and <see cref="P:System.Formats.Tar.GnuTarEntry.ChangeTime" /> because most TAR tools do not support these fields for this format.</para>
303+
</remarks>
301304
<exception cref="T:System.ObjectDisposedException">The archive stream is disposed.</exception>
302305
<exception cref="T:System.ArgumentException">
303306
<paramref name="fileName" /> or <paramref name="entryName" /> is <see langword="null" /> or empty.</exception>

0 commit comments

Comments
 (0)