mirror of
https://github.com/0TheSpy/Seaside.git
synced 2025-01-09 10:58:48 +08:00
Update Config.hpp
This commit is contained in:
parent
b73ff98f9d
commit
b37e6688c0
@ -160,20 +160,25 @@ public:
|
|||||||
std::string search_path = "*.ss";
|
std::string search_path = "*.ss";
|
||||||
WIN32_FIND_DATA fd;
|
WIN32_FIND_DATA fd;
|
||||||
HANDLE hFind = ::FindFirstFile(search_path.c_str(), &fd);
|
HANDLE hFind = ::FindFirstFile(search_path.c_str(), &fd);
|
||||||
|
std::string vremya;
|
||||||
if (hFind != INVALID_HANDLE_VALUE) {
|
if (hFind != INVALID_HANDLE_VALUE) {
|
||||||
do {
|
do {
|
||||||
if (!(fd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)) {
|
if (!(fd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)) {
|
||||||
configs.push_back(fd.cFileName);
|
configs.push_back(fd.cFileName);
|
||||||
time_t epoch = to_time_t(fd.ftLastWriteTime);
|
time_t epoch = to_time_t(fd.ftLastWriteTime);
|
||||||
std::string vremya = asctime(gmtime(&epoch));
|
time_t creation = to_time_t(fd.ftCreationTime);
|
||||||
times.push_back(vremya);
|
if (epoch != creation)
|
||||||
|
vremya = asctime(localtime(&epoch));
|
||||||
|
else
|
||||||
|
vremya = "empty";
|
||||||
|
times.push_back(vremya);
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
printf("fn %s %s", fd.cFileName, vremya.c_str());
|
printf("fn %s %s", fd.cFileName, vremya.c_str());
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
} while (::FindNextFile(hFind, &fd));
|
} while (::FindNextFile(hFind, &fd));
|
||||||
::FindClose(hFind);
|
::FindClose(hFind);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user