1 #include <msp/core/application.h>
2 #include <msp/fs/dir.h>
3 #include <msp/fs/stat.h>
10 ApplicationResources::ApplicationResources()
12 FS::Path data_dir = FS::get_sys_data_dir()/"data";
14 if(FS::exists(data_dir))
19 FS::Path main_pack = FS::get_sys_data_dir()/(Application::get_name()+".mdp");
20 if(FS::exists(main_pack))
21 pack_src.add_pack_file(main_pack.str());
22 if(FS::exists(data_dir))
24 for(const string &f: FS::list_filtered(data_dir, "\\.mdp$"))
25 pack_src.add_pack_file((data_dir/f).str());
30 void ApplicationResources::add_dir(const FS::Path &path)
32 dir_src.add_directory(path);
33 for(const string &f: FS::list_files(path))
41 } // namespace Msp::Game