// // EX06CON.CPP // // C++/DOS Example program for ArchiveLib 2.0 // // Copyright (c) Greenleaf Software, Inc. 1994 - 1996 // All Rights Reserved // // MEMBERS/FUNCTIONS DEMONSTRATED // // // DESCRIPTION // // This example program creates a list of files using the ability of // ALWildCardExpander to traverse subdirectories when expanding wild // card file specifications. Of course, you might not have any // subdirectories when you run this. If not, try creating some and // putting *.CPP and *.OBJ files in some of them. Or even better, // change the file spec to "C:\\*.CPP" to get lots-o-files. // // REVISION HISTORY // // February 1, 1996 2.0A : Second release // #include #include "arclib.h" #include "pkarc.h" #include "glarc.h" #include "bargraph.h" main( int, char *[] ) { cout << "Archive Library 2.0\nEX06CON.CPP\n\n"; cout << "This example program creates a list of files using the ability of\n"; cout << "ALWildCardExpander to traverse subdirectories when expanding wild\n"; cout << "card file specifications. Of course, you might not have any\n"; cout << "subdirectories when you run this. If not, try creating some and\n"; cout << "putting *.CPP and *.OBJ files in some of them. Or even better,\n"; cout << "change the file spec to 'C:\\*.CPP' to get lots-o-files.\n"; getch(); ALBarGraph monitor( AL_MONITOR_OBJECTS, cout ); cout << "\nRecursively adding *.cpp and *.obj to "; #if defined( ZIP ) cout << "dos00.zip\n"; ALPkArchive archive( "dos00.zip" ); ALEntryList list( &monitor, PkTools() ); #else cout << "dos00.gal\n"; ALGlArchive archive( "dos00.gal" ); ALEntryList list( &monitor ); #endif list.AddWildCardFiles( "*.cpp, *.obj", 1 ); return archive.Create( list ); }