MCPcopy Create free account
hub / github.com/Redot-Engine/redot-engine / _write_or_error

Method _write_or_error

platform/web/export/export_plugin.cpp:105–113  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

103}
104
105Error EditorExportPlatformWeb::_write_or_error(const uint8_t *p_content, int p_size, String p_path) {
106 Ref<FileAccess> f = FileAccess::open(p_path, FileAccess::WRITE);
107 if (f.is_null()) {
108 add_message(EXPORT_MESSAGE_ERROR, TTR("Export"), vformat(TTR("Could not write file: \"%s\"."), p_path));
109 return ERR_FILE_CANT_WRITE;
110 }
111 f->store_buffer(p_content, p_size);
112 return OK;
113}
114
115void EditorExportPlatformWeb::_replace_strings(const HashMap<String, String> &p_replaces, Vector<uint8_t> &r_template) {
116 String str_template = String::utf8(reinterpret_cast<const char *>(r_template.ptr()), r_template.size());

Callers

nothing calls this directly

Calls 4

TTRFunction · 0.85
vformatFunction · 0.85
is_nullMethod · 0.45
store_bufferMethod · 0.45

Tested by

no test coverage detected