1 #include <msp/fs/dir.h>
2 #include <msp/fs/stat.h>
3 #include "directorycollection.h"
10 DirectoryCollection::DirectoryCollection()
15 void DirectoryCollection::set_directory(const FS::Path &d)
21 void DirectoryCollection::add_directory(const FS::Path &d)
26 void DirectoryCollection::load_names()
28 for(list<FS::Path>::const_iterator i=dirs.begin(); i!=dirs.end(); ++i)
30 list<string> names = FS::list_files(*i);
31 for(list<string>::const_iterator j=names.begin(); j!=names.end(); ++j)
36 bool DirectoryCollection::lookup_file(const string &name, FS::Path &result) const
38 for(list<FS::Path>::const_iterator i=dirs.begin(); i!=dirs.end(); ++i)
40 FS::Path file_path = *i/name;
41 if(FS::exists(file_path))
51 } // namespace DataFile