|
/*
* Created by SharpDevelop.
* User: LYCJ
* Date: 29/11/2006
* Time: 15:40
*
* To change this template use Tools | Options | Coding | Edit Standard Headers.
*/
using System;
using System.Collections.Generic;
using System.Text;
namespace Cake3.Cmarc
{
/// <summary>
/// Description of ArjBase.
/// </summary>
public class ArjBase : ArchiverBase
{
private const string DLLPATH = "Unarj32j.dll";
private const string ARCHIVER = "Unarj";
public ArjBase() : base()
{
}
public static List<string> SupportedExtensions()
{
List<string> retVal = new List<string>();
if (Utils.verifyDllPath(DLLPATH))
{
retVal.Add(".arj");
}
return retVal;
}
protected override void SetArchiverName()
{
archiverName = ARCHIVER;
dllPath = DLLPATH;
}
internal override string GetExtractCommand(Cake3.ExtractOptions options, string filename)
{
if (options.archiveName == "")
throw new Exception("No archive specified!");
StringBuilder sb = new StringBuilder();
sb.Append("x -+ -a1 -c1 -n1 -x1");
sb.Append('"' + options.archiveName + '"' + ' ');
sb.Append("-o" + '"' + options.extractFolder + '"' + ' ');
sb.Append('"' + filename + '"' + ' ');
return sb.ToString();
}
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.