public Item(EpubFile belongTo, EpubFileEntry entry, string id, string mediaType, string properties) { this.belongTo = belongTo; this.id = id; this.mediaType = mediaType; this.properties = properties; string dir = Path.GetDirectoryName(belongTo.packageFile.fullName); href = Path.GetRelativePath(dir, entry.fullName).Replace('\\', '/'); }
public Item(XmlElement e, EpubFile belongTo, string packageFilePath) { this.belongTo = belongTo; href = e.GetAttribute("href"); id = e.GetAttribute("id"); mediaType = e.GetAttribute("media-type"); properties = e.GetAttribute("properties"); if (href[0] != '/') { string dir = Path.GetDirectoryName(packageFilePath); if (dir != "") { filePath = Path.GetDirectoryName(packageFilePath) + "/" + href; } } else { filePath = href; } }
public EpubFile(EpubFile e) { //todo }