7#include "core/fxcrt/fx_folder.h"
11#include "build/build_config.h"
12#include "third_party/base/memory/ptr_util.h"
15#error "built on wrong platform"
23 bool GetNextFile(ByteString* filename,
bool* bFolder)
override;
30 bool m_bReachedEnd =
false;
31 WIN32_FIND_DATAA m_FindData;
34std::unique_ptr<FX_Folder>
FX_Folder::OpenFolder(
const ByteString& path) {
37 ByteString search_path = path
+ "/*.*";
39 FindFirstFileExA(search_path.c_str(), FindExInfoStandard,
40 &handle->m_FindData, FindExSearchNameMatch,
nullptr, 0);
41 if (handle->m_Handle == INVALID_HANDLE_VALUE)
50 if (m_Handle != INVALID_HANDLE_VALUE)
58 *filename = m_FindData.cFileName;
59 *bFolder = !!(m_FindData.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY);
60 if (!FindNextFileA(m_Handle, &m_FindData))
~FX_WindowsFolder() override
bool GetNextFile(ByteString *filename, bool *bFolder) override
ByteString operator+(const ByteString &str1, const char *str2)