You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
732 B
20 lines
732 B
using System.IO.Compression;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace VersOne.Epub.Internal
|
|
{
|
|
public static class SchemaReader
|
|
{
|
|
public static async Task<EpubSchema> ReadSchemaAsync(ZipArchive epubArchive)
|
|
{
|
|
var result = new EpubSchema();
|
|
var rootFilePath = await RootFilePathReader.GetRootFilePathAsync(epubArchive).ConfigureAwait(false);
|
|
var contentDirectoryPath = ZipPathUtils.GetDirectoryPath(rootFilePath);
|
|
result.ContentDirectoryPath = contentDirectoryPath;
|
|
var package = await PackageReader.ReadPackageAsync(epubArchive, rootFilePath).ConfigureAwait(false);
|
|
result.Package = package;
|
|
return result;
|
|
}
|
|
}
|
|
}
|