1
0

WIP: Added packing of AR and TAR

This commit is contained in:
2023-03-13 10:08:50 +01:00
parent e8a1378f60
commit 7cd5358ac8
18 changed files with 2071 additions and 4 deletions

View File

@@ -0,0 +1,53 @@
using System;
//[assembly: System.Runtime.CompilerServices.InternalsVisibleTo("UnitTests")]
namespace AMWD.Common.Packing.Ar
{
/// <summary>
/// Represents the file information saved in the archive.
/// </summary>
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
public class ArFileInfo
{
/// <summary>
/// Gets or sets the file name.
/// </summary>
public string FileName { get; set; }
/// <summary>
/// Gets or sets the file size in bytes.
/// </summary>
public long FileSize { get; set; }
/// <summary>
/// Gets or sets the timestamp of the last modification.
/// </summary>
public DateTime ModifyTime { get; set; }
/// <summary>
/// Gets or sets the user id.
/// </summary>
public int UserId { get; set; }
/// <summary>
/// Gets or sets the group id.
/// </summary>
public int GroupId { get; set; }
/// <summary>
/// Gets or sets the access mode in decimal (not octal!).
/// </summary>
/// <remarks>
/// To see the octal representation use <c>Convert.ToString(Mode, 8)</c>.
/// </remarks>
public int Mode { get; set; }
}
internal class ArFileInfoExtended : ArFileInfo
{
public long HeaderPosition { get; set; }
public long DataPosition { get; set; }
}
}