7#include "core/fxcrt/fx_folder.h"
11#include "build/build_config.h"
12#include "core/fxcrt/ptr_util.h"
13#include "core/fxcrt/unowned_ptr.h"
16#error "built on wrong platform"
31 FX_PosixFolder(
const ByteString& path, DIR* dir);
38 DIR* dir = opendir(path.c_str());
47 : m_Path(path), m_Dir(dir) {}
50 closedir(m_Dir.ExtractAsDangling());
54 struct dirent* de = readdir(m_Dir);
58 ByteString fullpath = m_Path +
"/" + de->d_name;
60 if (stat(fullpath.c_str(), &deStat) < 0)
63 *filename
= de->d_name;
64 *bFolder = S_ISDIR(deStat.st_mode);
fxcrt::ByteString ByteString
bool GetNextFile(ByteString *filename, bool *bFolder) override
~FX_PosixFolder() override
ByteString & operator=(const char *str)