Skip to content
Snippets Groups Projects
Commit 0cefb3b7 authored by Dmitri Naumov's avatar Dmitri Naumov
Browse files

[BL] Remove unused FileFinder::getPath().

parent 67025461
No related branches found
No related tags found
No related merge requests found
...@@ -52,24 +52,4 @@ void FileFinder::addDirectory(std::string const& dir) ...@@ -52,24 +52,4 @@ void FileFinder::addDirectory(std::string const& dir)
_directories.push_back(dir); _directories.push_back(dir);
} }
} }
} // namespace BaseLib
std::string FileFinder::getPath(std::string const& filename) const
{
if (_directories.empty())
ERR("FileFinder::getPath(): No directories set.");
for (auto const& dir : _directories)
{
std::string testDir(dir);
std::ifstream is(testDir.append(filename).c_str());
if (is.good())
{
is.close();
return testDir;
}
}
ERR("FileFinder::getPath(): File not found.");
return filename;
}
} // end namespace BaseLib
...@@ -45,13 +45,6 @@ public: ...@@ -45,13 +45,6 @@ public:
*/ */
void addDirectory(std::string const& dir); void addDirectory(std::string const& dir);
/**
* Given a filename, this method will return the complete path where this file can be found.
* If the file is located in more than one of the directories in the search list, only the
* first location will be returned.
*/
std::string getPath(std::string const& filename) const;
private: private:
std::vector<std::string> _directories; std::vector<std::string> _directories;
}; };
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment