1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
|
...
WIN32_FIND_DATA data;
HANDLE h = FindFirstFile("test/*.*", &data);
BOOL bMoreFiles = (h != INVALID_HANDLE_VALUE);
while (bMoreFiles)
{
if (data.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) {
;
}else {
using namespace std;
ostringstream oss;
for (unsigned int j=0 ; j<strlen(data.cFileName); j++)
oss << setfill('0') << static_cast<char>(data.cFileName[j]);
string s = "test/" + oss.str();
std::wstring ws;
ws.assign(s.begin(), s.end());
cout << ws.c_str() << endl;
fi.Find(ws.c_str());
......
}
bMoreFiles = FindNextFile(h, &data);
}
... |
Partager