/// <summary> /// Constructor with a FileInfo object to an existing file. /// </summary> /// <param name="filePath"></param> /// <param name="options"></param> public static RarArchive Open(string filePath, ReaderOptions?options = null) { filePath.CheckNotNullOrEmpty(nameof(filePath)); FileInfo fileInfo = new FileInfo(filePath); return(new RarArchive(new SourceStream(fileInfo, i => RarArchiveVolumeFactory.GetFilePart(i, fileInfo), options ?? new ReaderOptions()))); }
/// <summary> /// Constructor with a FileInfo object to an existing file. /// </summary> /// <param name="fileInfo"></param> /// <param name="options"></param> public static RarArchive Open(FileInfo fileInfo, ReaderOptions?options = null) { fileInfo.CheckNotNull(nameof(fileInfo)); return(new RarArchive(new SourceStream(fileInfo, i => RarArchiveVolumeFactory.GetFilePart(i, fileInfo), options ?? new ReaderOptions()))); }