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

◆ read_text()

std::optional< std::string > MayaFlux::Reflect::Tool::read_text ( const std::filesystem::path & path)
nodiscard

The whole content of path, or nullopt when it cannot be read.

Definition at line 30 of file Sidecar.cpp.

31{
32 std::ifstream stream(path, std::ios::binary);
33 if (!stream) {
34 return std::nullopt;
35 }
36 std::ostringstream content;
37 content << stream.rdbuf();
38 return content.str();
39}

Referenced by check_function_sidecars(), check_include(), check_sidecars(), insert_include(), and write_if_changed().

Here is the caller graph for this function: