#include "StdAfx.h" #include "src\XZip.h" #include "src\XUnzip.h" int main() { std::ifstream fin; std::string dir, filepath; int num; DIR *dp; struct dirent *dirp; struct stat filestat; std::string filename; std::string userInput; std::cout <<"Input dir to get files from: "; getline( std::cin, dir ); // gets everything the user dp = opendir( dir.c_str() ); if (dp == NULL) { std::cout << "Error opening " << dir << std::endl; } char test[2]; while ((dirp = readdir( dp )) != NULL) { // printf(" inside the directory "); filepath = dir+"/" + dirp->d_name; filename =dirp.d_name; test[0]=filename[0]; test[1]='\0'; if ( test[0]=='W') { HZIP* z; DWORD File_name = std::strtoul(filename.c_str(), NULL, 16); OpenZip(z,0,File_name); } } return 0; }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)