libyui
YPath.h
1 /*
2  Copyright (c) 2012 Björn Esser
3 
4  Permission is hereby granted, free of charge, to any person obtaining
5  a copy of this software and associated documentation files (the
6  "Software"), to deal in the Software without restriction, including
7  without limitation the rights to use, copy, modify, merge, publish,
8  distribute, sublicense, and/or sell
9  copies of the Software, and to permit persons to whom the Software is
10  furnished to do so, subject to the following conditions:
11 
12  The above copyright notice and this permission notice shall be
13  included in all copies or substantial portions of the Software.
14 
15  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
18  SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
19  DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
20  OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
21  THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22 */
23 
24 
25 /*-/
26 
27  File: YPath.h
28 
29  Author: Björn Esser <bjoern.esser@gmail.com>
30 
31 /-*/
32 
33 #ifndef YPath_h
34 #define YPath_h
35 
36 #include <string>
37 #include <vector>
38 
43 class YPath
44 {
45 
46 public:
47 
56  YPath( const std::string & directory,
57  const std::string & filename );
61  ~YPath();
62 
67  std::string path();
68 
74  std::string dir();
75 
76 private:
77 
78  std::vector<std::string> lsDir( const std::string & directory );
79  std::string lookRecursive( const std::string & directory, const std::string & filename );
80  std::string fullPath;
81 
82 };
83 
84 #endif // YUIDIRFINDER_H
std::string path()
Definition: YPath.cc:189
~YPath()
Definition: YPath.cc:137
YPath(const std::string &directory, const std::string &filename)
Definition: YPath.cc:51
std::string dir()
Definition: YPath.cc:195
Definition: YPath.h:43