1 // ======================================================================
4 // copyright (c) 2001 Sony Online Entertainment
6 // ======================================================================
8 #include "FirstUiBuilder.h"
9 #include "FileLocator.h"
13 // ======================================================================
14 FileLocator
* FileLocator::ms_gFileLocator
= 0;
16 //-----------------------------------------------------------------
18 FileLocator::FileLocator () :
23 //-----------------------------------------------------------------
25 const bool FileLocator::findFile (const char * filename
, UINarrowString
& result
)
27 for (PathVector_t::iterator iter
= m_paths
.begin (); iter
!= m_paths
.end (); ++iter
)
29 UINarrowString pathToCheck
= *iter
+ "/" + filename
;
31 FILE * fl
= fopen (pathToCheck
.c_str (), "r");
44 //-----------------------------------------------------------------
45 void FileLocator::addPath (UINarrowString path
)
47 m_paths
.push_back (path
);
49 //-----------------------------------------------------------------
50 void FileLocator::ExplicitDestroy ()
52 delete ms_gFileLocator
;
56 // ======================================================================