MCPcopy Create free account
hub / github.com/GlobedGD/globed2 / loadCodeFromPath

Method loadCodeFromPath

src/modules/scripting-ui/ui/SetupEmbeddedScriptPopup.cpp:167–172  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

165}
166
167Result<> SetupEmbeddedScriptPopup::loadCodeFromPath(const std::filesystem::path& path) {
168 auto code = GEODE_UNWRAP(asp::fs::readToString(path));
169 this->loadCodeFromString(std::move(code));
170
171 return Ok();
172}
173
174void SetupEmbeddedScriptPopup::loadCodeFromString(std::string&& code) {
175 m_editor->setContent(code);

Callers 1

onUploadMethod · 0.95

Calls 1

loadCodeFromStringMethod · 0.95

Tested by

no test coverage detected