Skip to content

Commit

Permalink
Update the Python export for FileFinder::getFullPath
Browse files Browse the repository at this point in the history
Refs #11395
  • Loading branch information
martyngigg committed Mar 20, 2015
1 parent cd2f444 commit 09bab26
Showing 1 changed file with 7 additions and 2 deletions.
@@ -1,17 +1,22 @@
#include "MantidAPI/FileFinder.h"
#include <boost/python/class.hpp>
#include <boost/python/overloads.hpp>
#include <boost/python/reference_existing_object.hpp>

using Mantid::API::FileFinder;
using Mantid::API::FileFinderImpl;
using namespace boost::python;

namespace {
BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(getFullPathOverloader, getFullPath, 1, 2);
}

void export_FileFinder()
{
class_<FileFinderImpl, boost::noncopyable>("FileFinderImpl", no_init)
.def("getFullPath", &FileFinderImpl::getFullPath,
"Return a full path to the given file if it can be found within datasearch.directories paths. "
"An empty string is returned otherwise.")
getFullPathOverloader((arg("path"), arg("ignoreDirs")=false),
"Return a full path to the given file if it can be found within datasearch.directories paths. Directories can be ignored with ignoreDirs=True. An empty string is returned otherwise."))
.def("findRuns", &FileFinderImpl::findRuns, "Find a list of files file given a hint. "
"The hint can be a comma separated list of run numbers and can also include ranges of runs, e.g. 123-135 or equivalently 123-35"
"If no instrument prefix is given then the current default is used.")
Expand Down

0 comments on commit 09bab26

Please sign in to comment.