本文整理汇总了C#中SevenZip.SevenZipExtractor.GetRootDir方法的典型用法代码示例。如果您正苦于以下问题:C# SevenZipExtractor.GetRootDir方法的具体用法?C# SevenZipExtractor.GetRootDir怎么用?C# SevenZipExtractor.GetRootDir使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SevenZip.SevenZipExtractor
的用法示例。
在下文中一共展示了SevenZipExtractor.GetRootDir方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: RarImporterHelper
internal RarImporterHelper(SevenZipExtractor Sex)
{
string FileName = Sex.FileName;
_DP = Path.GetFileName(FileName);
StringAlbumParser sa = null;
_RootDir = Sex.GetRootDir();
if (_RootDir != null)
{
sa = StringAlbumParser.FromDirectoryHelper(_RootDir);
_RootLength = _RootDir.Path.Length;
}
if ((sa == null) || (sa.FounSomething == false))
sa = StringAlbumParser.FromRarZipName(FileName);
_Album = sa.AlbumName;
_Artist = sa.AlbumAuthor;
_Year = sa.AlbumYear;
_MaxLengthWithoutRoot = (from path in Sex.SafeArchiveFileNames() let npath = ConvertFileName(path) let len = (npath == null) ? 0 : npath.Length select len).Max();
_MaxLengthFlat = (from path in Sex.ArchiveFileData let npath = Path.GetFileName(path.SafePath()) where (!path.IsDirectory) select npath.Length).Max();
_MaxLengthBasic = (from path in Sex.SafeArchiveFileNames() select path.Length).Max();
if (_MaxLengthFlat > _MaxLengthWithoutRoot)
throw new Exception("Algo Error");
if (_MaxLengthWithoutRoot > _MaxLengthBasic)
throw new Exception("Algo Error");
}