Check the method in project

122 views Asked by At

I am trying to debug code from https://nunrar.codeplex.com/. In branch DOCUMENTATION -> Basic Usage there is the following code:

RarArchive archive = RarArchive.Open(source);
foreach (RarArchiveEntry entry in archive.Entries)
{
    string path = Path.Combine(destination, Path.GetFileName(entry.FilePath));
    entry.ExtractToFile(path);
}

Well.. I 've downloaded source code, find RarArchiveEntry class and started to looking for method ExtractToFile(), but there isn't any method there neither in class, nor in project! Please help me to find this method or method which i can call to look through how this programm can unpack rar files step-by-step?

1

There are 1 answers

1
Derrick Moeller On BEST ANSWER

It looks like the documentation is obsolete and the name of the method was changed, there is an extension method found in RarArchiveEntry.Exensions.cs called WriteToFile.

/// <summary>
/// Extract to specific file
/// </summary>
public static void WriteToFile(this RarArchiveEntry entry, string destinationFileName, ExtractOptions options = ExtractOptions.Overwrite)
{
    entry.WriteToFile(destinationFileName, new NullRarExtractionListener(), options);
}