|
using System;
using System.Xml.Serialization;
using SimplePack.Helper;
namespace SimplePack.Data
{
///<summary>
/// FileArchive represent file structure in Archive hierarchical structure.
///</summary>
[Serializable]
public class FileArchive : ElementaryArchive
{
#region Properties
private long startSeek;
private uint checkSum;
#endregion
#region Constructors
///<summary>
/// Default constructor.
///</summary>
public FileArchive()
{
//necessary for xmlreader/writer
}
///<summary>
///</summary>
///<param name="name">Name of file (with extension)</param>
public FileArchive(string name)
: this(name, null, null, 0, 0)
{
}
///<summary>
///</summary>
///<param name="name">Name of file (with extension)</param>
///<param name="fullPath">File's full path</param>
///<param name="parentDirectory">Parent directory to current file</param>
///<param name="length">Length of file</param>
///<param name="checkSum">CRC checksum</param>
public FileArchive(string name, string fullPath, IArchiveStructure parentDirectory, long length, uint checkSum)
{
Name = name;
FullPath = fullPath;
ParentDirectory = parentDirectory;
Length = length;
CheckSum = checkSum;
}
#endregion
#region Attributes
///<summary>
/// Start position of file which is stored in Archive.
///</summary>
[XmlAttribute]
public long StartSeek
{
get { return startSeek; }
set { startSeek = value; }
}
///<summary>
/// CRC checksum.
///</summary>
[XmlAttribute]
public uint CheckSum
{
get { return checkSum; }
set { checkSum = value; }
}
#endregion
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.