MayaFlux 0.4.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ find_include_dir()

MAYAFLUX_HOST_API std::optional< std::filesystem::path > MayaFlux::Host::Live::find_include_dir ( const std::string &  filename)

Find the directory containing a header staged for inclusion.

Used by the JIT to resolve #include directives for staged headers.

Parameters
filenameHeader filename to find, e.g. "Dust.hpp"
Returns
optional path to the directory containing the header, or nullopt if the header was not staged or could not be found.

Definition at line 99 of file Runtime.cpp.

100{
101 const auto cwd = std::filesystem::current_path();
102 for (const auto& entry : std::filesystem::recursive_directory_iterator(cwd)) {
103 if (entry.is_regular_file() && entry.path().filename() == filename) {
104 return entry.path().parent_path();
105 }
106 }
107 return std::nullopt;
108}

Referenced by lila_add_header().

+ Here is the caller graph for this function: