CAKE3
Home > Products > Components > CAKE3
Cake3 (Common Archiver Kit Experiment 3) is a dotNet implementation of Cake, which act as a interface between your application and the dlls, allow dotNet application to access contents of an archive, or to create new one.
License
Read CAKE3 licenseHelp file
Online help fileChangeLog
Read ChangelogCurrent status
List and Extract archive from all supported archives.Compress support for zip, 7z and lha archives.
Sample project is not avaliable at this time, please use the message board for any questions.
Features
Update to dotNet
Because of the nature of the dotNet environment, component user is no longer needed to install half dozen of components.Most commands in CakUtils2.pas is implemented in Cake3.Utils (e.g. Utils.GetFileName, Utils.SizeInK)
Standard progress and error message
CAKE3 have a list of progress and error messages, and it will return the message when needed. (except messages that is directly returned from the dll)The list does not support translation at this time, but it can be implemented on demand.
Listing run.sqx
Extracting run.sqx
Processing uAbout.cpp... OK
.
.
OK, No error detected
Listing Cake3.zip
Extracting Cake3.zip
Processing Cake3.dll...
.
.
OK, No error detected
Listing run1.7z
Extracting run1.7z
.
.
Processing archive: C:\temp1\run1.7z
Extracting Qzip45\Output\Scripts\C_Relative.akp
.
.
Everything is Ok
OK, No error detected
Change Listing method
When listing, an event OnItemList, is called for each file in archive. You can choose to store the filelist inside CAKE3 component, or have your own implementation.New component : ContentList, which support sorting, is used for filelist, support "for...each" syntax and array. (e.g. Archive_Content[0].fileName)
Relative path
Compression with relative path is fully supported (CAKE2 sometimes require the use of subst command), AddOptions.addFolder have 3 modes (relative, full, none).Dll version update
The component is designed to work with latest version of the archiver dlls, e.g. sqx20.dll, Sqx version 2 engine.How to use?
List
Cakdir3 c3 = new Cakdir3(@"c:\temp1\test1.lha");
//Traditional method
for (int32 i = 0; i < c3.Archive_Contents.Count; i++)
{
ContentType ct = c3.Archive_Contents[i];
Console.WriteLine(ct.fileName);
}
//Foreach
foreach (ContentType ct in c3.Archive_Contents)
{
Console.WriteLine(ct.fileName);
}
//Directorylist
//To list Subdirectory in specified directory use GetSubdirectoryList(path)
foreach (string s in c3.Archive_Contents.GetDirectoryList())
{
Console.WriteLine(s);
}
Sort filelist
c3.Archive_Contents.Sort( ContentType.SortMetric.FileName );
Decompress
Cakdir3 c3 = new Cakdir3(@"c:\temp1\test1.lha");
c3.ExtractOptions.extractItem = new String[1] {c3.Archive_Contents[0].fileName};
c3.ExtractOptions.extractFolder = Utils.GetTempPath() + "qztemp";
c3.ExtractOptions.allowFolder = true;
c3.ExtractOptions.allowOverwrite = true;
if (c3.Extract())
Console.WriteLine("Success");
Compress
Cakdir3 c3 = new Cakdir3(@"c:\temp1\test1.lha");
c3.AddOptions.addFolder = AddOptions.folderMode.relative;
c3.AddOptions.baseFolder = @"c:\temp1\";
//Mask not supported in current version.
c3.AddOptions.addFile = new String[2] {@"c:\temp1\run.zip", @"C:\temp1\test\Toolbar.bmp"};
c3.Add();
Delete
Cakdir3 c3 = new Cakdir3(@"c:\temp1\test1.zip");
c3.DeleteOptions.deleteFile = new String[1] { @"\test\Toolbar.bmp"};
c3.Delete();
Downloads
Download Site 1 (GoogleGroups, 1.0.2576.40577)Download Site 1 (GoogleGroups, CAKE Command Line 0.1)
Supported Archives
Please noted that Xacrett support extract only.- Zip archives (SharpZipLib)
- 7z archives (7-zip32.dll)
- Ace archives (acev2.dll)
- Arj archives (Unarj32j.dll)
- Lha archives (Unlha32.dll)
- Sqx archives (Sqx20.dll)
- Rar archives (unrar.dll)
- Cab archives (Xacrett.dll)
- Rar archives (Xacrett.dll)
- Yz1 archives (Xacrett.dll)
- Bga archives (Xacrett.dll)
- Gca archives (Xacrett.dll)
- Imp archives (Xacrett.dll)
- Zoo archives (Xacrett.dll)
- Arc archives (Xacrett.dll)
- Cpt archives (Xacrett.dll)
- Pit archives (Xacrett.dll)
- Arg archives (Xacrett.dll)
- Asd archives (Xacrett.dll)
- Zac archives (Xacrett.dll)
- MacBin archives (Xacrett.dll)
- Tar, Cpio, Rpm archives (Xacrett.dll)
- Shar archives (Xacrett.dll)
- Quake Pak archives (Xacrett.dll)
- Ar(Deb) archives (Xacrett.dll)
- Gzip archives (Xacrett.dll)
- Bzip2 archives (Xacrett.dll)
- Compress archives (Xacrett.dll)
- Pack archives (Xacrett.dll)
- Compact archives (Xacrett.dll)
- Freeze archives (Xacrett.dll)
- Belon archives (Xacrett.dll)
- Splint archives (Xacrett.dll)
- Jam archives (Xacrett.dll)
- MS-Compress archives (Xacrett.dll)
- Base64 archives (Xacrett.dll)
- UUEncoded files (Xacrett.dll)
- XXEncoded files (Xacrett.dll)
- BinHex archives (Xacrett.dll)
- Ish archives (Xacrett.dll)
- Boo archives (Xacrett.dll)
- BtoA archives (Xacrett.dll)
- Fish archives (Xacrett.dll)
- Jack archives (Xacrett.dll)
- Rez archives (Xacrett.dll)
- Cab(InstallShield) archives (Xacrett.dll)
- Dzip archives (Xacrett.dll)
- yEnc archives (Xacrett.dll)
- Dmg archives (Xacrett.dll)
- BriefLZ archives (Xacrett.dll)
- ISO (Xacrett.dll)
- Alz archives (Xacrett.dll)
- Lzx archives (Xacrett.dll)
- Jcalgl archives (Xacrett.dll)
- apLib archives (Xacrett.dll)
- Neo_ASK archives (Xacrett.dll)
