using System;
using VersOne.Epub.Schema;
namespace VersOne.Epub
{
///
/// The base class for a local content file within the EPUB archive (e.g., an HTML file or an image).
/// Unlike , the classes derived from this base class contain the whole content of the file.
///
public abstract class EpubLocalContentFile : EpubContentFile
{
///
/// Initializes a new instance of the class.
///
/// The content file key as it is declared in the EPUB manifest (in the property).
/// The type of the content of the file.
/// The MIME type of the content of the file.
/// The absolute path of the local content file in the EPUB archive.
/// The parameter is null.
/// The parameter is null.
protected EpubLocalContentFile(string key, EpubContentType contentType, string contentMimeType, string filePath)
: base(key, contentType, contentMimeType)
{
FilePath = filePath ?? throw new ArgumentNullException(nameof(filePath));
}
///
/// Gets the absolute path of the local content file in the EPUB archive.
///
public string FilePath { get; }
///
/// Gets the location of the content file which is always for local content files.
///
public override EpubContentLocation ContentLocation => EpubContentLocation.LOCAL;
}
}