Zip.cpp を用いたファイル一覧の取得
#include <iostream>
using namespace hrk;
using namespace std;
int main(int argc, char *argv[])
{
string zip_file = "text_1_2.zip";
if (argc >= 2) {
zip_file = argv[1];
}
if (!zip.
uncompress(zip_file)) {
return 1;
}
vector<Zip::header_t> headers = zip.
headers();
for (Zip::Headers::iterator it = headers.begin();
it != headers.end(); ++it) {
cout << header.
name <<
", " << header.
date << endl;
}
cout << "current time: " << time(NULL) << endl;
return 0;
}