Introduce g_resources.getDirectoryFiles

This can recursively find files in a directory that's not in physfs search
path, this is needed for mapeditor needs, esp the file browser.

We do not want to limit users to the application run directory
so we have to use this.

This function uses boost filesystem.
Prototype:
	g_resources.getDirectoryFiles(directory STRING, filenameOnly BOOL,
	recursive BOOL)

filenameOnly is there if we want to just get the filenames in the
directory.
recursive if we want to loop directories in the directory.
This commit is contained in:
Ahmed Samy
2013-12-25 21:29:38 +02:00
parent 27db78567b
commit 6745bff132
4 changed files with 41 additions and 1 deletions

View File

@@ -197,7 +197,7 @@ message(STATUS "Build revision: ${BUILD_REVISION}")
add_definitions(-D"BUILD_REVISION=\\\"${BUILD_REVISION}\\\"")
# find boost
set(REQUIRED_BOOST_COMPONENTS system thread chrono)
set(REQUIRED_BOOST_COMPONENTS system thread filesystem chrono)
if(WIN32)
set(Boost_THREADAPI win32)
set(framework_DEFINITIONS ${framework_DEFINITIONS} -DBOOST_THREAD_USE_LIB) # fix boost thread linkage