~esys-p-dev/esys-particle/trunk

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
/*=============================================================================
??
??******************************************************************************
??*                                               *
??* COPYRIGHT ??????? - All Rights Reserved *
??*  *
??* This software is the property of ??????????????. No part of this code   *
??* may be copied in any form or by any means without the expressed written   *
??* consent of ???????????. Copying, use or modification of this software     *
??* by any unauthorised person is illegal unless that    *
??* person has a software license agreement with ?????????????.            *
??*                                                          *
??******************************************************************************
??
*********************************************************************************/

#ifndef ESYS_LSMPATHSEARCHER_H
#define ESYS_LSMPATHSEARCHER_H

#include <boost/filesystem/path.hpp>
#include <vector>

namespace esys
{
  namespace lsm
  {
    class PathSearcher
    {
    public:
      PathSearcher(const std::string &delimitedPathList, const std::string &delim = ":");
      
      bool exists(const std::string &fileName);
      
      boost::filesystem::path findPath(const std::string &fileName);
      
      std::string find(const std::string &fileName);
      
    private:
      typedef std::vector<boost::filesystem::path> PathVector;
      PathVector m_pathVector;
    };
  }
}

#endif