mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-09-08 13:43:27 +02:00
Add flag to enable getFilesInDir to get hidden files (dotfiles).
This commit is contained in:
+2
-2
@@ -234,7 +234,7 @@ bool FileInfo::operator <(const FileInfo &other) const {
|
||||
return false;
|
||||
}
|
||||
|
||||
size_t getFilesInDir(const char *directory, std::vector<FileInfo> *files, const char *filter) {
|
||||
size_t getFilesInDir(const char *directory, std::vector<FileInfo> *files, const char *filter, int flags) {
|
||||
size_t foundEntries = 0;
|
||||
std::set<std::string> filters;
|
||||
std::string tmp;
|
||||
@@ -292,7 +292,7 @@ size_t getFilesInDir(const char *directory, std::vector<FileInfo> *files, const
|
||||
continue;
|
||||
|
||||
// Remove dotfiles (should be made optional?)
|
||||
if (virtualName[0] == '.')
|
||||
if (!(flags & GETFILES_GETHIDDEN) && virtualName[0] == '.')
|
||||
continue;
|
||||
|
||||
FileInfo info;
|
||||
|
||||
+5
-1
@@ -27,7 +27,11 @@ std::string getFileExtension(const std::string &fn);
|
||||
std::string getDir(const std::string &path);
|
||||
std::string getFilename(std::string path);
|
||||
bool getFileInfo(const char *path, FileInfo *fileInfo);
|
||||
size_t getFilesInDir(const char *directory, std::vector<FileInfo> *files, const char *filter = 0);
|
||||
|
||||
enum {
|
||||
GETFILES_GETHIDDEN = 1
|
||||
};
|
||||
size_t getFilesInDir(const char *directory, std::vector<FileInfo> *files, const char *filter = 0, int flags = 0);
|
||||
void deleteFile(const char *file);
|
||||
void deleteDir(const char *file);
|
||||
bool exists(const std::string &filename);
|
||||
|
||||
+8
-1
@@ -242,6 +242,7 @@
|
||||
<ClInclude Include="gfx_es2\draw_buffer.h" />
|
||||
<ClInclude Include="gfx_es2\draw_text.h" />
|
||||
<ClInclude Include="gfx_es2\fbo.h" />
|
||||
<ClInclude Include="gfx_es2\gl3stub.h" />
|
||||
<ClInclude Include="gfx_es2\glsl_program.h" />
|
||||
<ClInclude Include="gfx_es2\gl_state.h" />
|
||||
<ClInclude Include="gfx_es2\gpu_features.h" />
|
||||
@@ -717,6 +718,12 @@
|
||||
<ClCompile Include="gfx_es2\draw_buffer.cpp" />
|
||||
<ClCompile Include="gfx_es2\draw_text.cpp" />
|
||||
<ClCompile Include="gfx_es2\fbo.cpp" />
|
||||
<ClCompile Include="gfx_es2\gl3stub.c">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="gfx_es2\glsl_program.cpp" />
|
||||
<ClCompile Include="gfx_es2\gl_state.cpp" />
|
||||
<ClCompile Include="gfx_es2\gpu_features.cpp" />
|
||||
@@ -763,4 +770,4 @@
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
</Project>
|
||||
@@ -326,6 +326,9 @@
|
||||
<ClInclude Include="ext\vjson\json.h">
|
||||
<Filter>ext\vjson</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="gfx_es2\gl3stub.h">
|
||||
<Filter>gfx</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="gfx\gl_debug_log.cpp">
|
||||
@@ -772,6 +775,9 @@
|
||||
<ClCompile Include="ext\vjson\json.cpp">
|
||||
<Filter>ext\vjson</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="gfx_es2\gl3stub.c">
|
||||
<Filter>gfx</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Filter Include="gfx">
|
||||
@@ -850,4 +856,4 @@
|
||||
<UniqueIdentifier>{c6910d82-73d3-4d97-ac9c-bcc03265b1bc}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
</Project>
|
||||
Reference in New Issue
Block a user