24 "within the InputParameters.\nUse getParam<DataFileName>(\"",
44 if (std::filesystem::path(relative_path).is_absolute())
47 "\"): This API should not be used for absolute paths.");
53 std::optional<std::string> error;
61 catch (std::exception & e)
71 "Should only ever obtain data");
72 mooseAssert(found_path.
data_name,
"Should be set");
74 const std::string msg =
75 "Using data file '" + found_path.
path +
"' from " + *found_path.
data_name +
" data";
78 return found_path.
path;
std::string getDataFilePath(const std::string &relative_path) const
Returns the path of a data file for a given relative file path.
void mooseDeprecated(Args &&... args) const
Context context
Context for the file (where it came from)
void mooseInfo(Args &&... args) const
std::string getDataFileNameByName(const std::string &relative_path) const
Deprecated method.
void mooseWarning(Args &&... args) const
Emits a warning prefixed with object name and type.
const T & getParam(const std::string &name) const
Retrieve a parameter for the object.
Representation of a data file path.
std::string getDataFileName(const std::string ¶m) const
Deprecated method.
Path getPath(std::string path, const std::optional< std::string > &base=std::optional< std::string >())
Get the data path for a given path, searching the registered data.
std::optional< std::string > data_name
The name of the data registry the file came from (with context == DATA)
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.
Base class shared by both Action and MooseObject.
bool _throw_on_error
Variable to turn on exceptions during mooseError(), should only be used within MOOSE unit tests or wh...
const ParallelParamObject & _parent
DataFileInterface(const ParallelParamObject &parent)
Constructing the object.