MCPcopy Create free account
hub / github.com/Eeive/Evcode-ide / save

Method save

src/editor/mod.rs:59–68  ·  view source on GitHub ↗
(&mut self)

Source from the content-addressed store, hash-verified

57 }
58
59 pub fn save(&mut self) -> Result<()> {
60 let path = self
61 .path
62 .as_ref()
63 .context("File has no path. Use Ctrl+Shift+S")?;
64 let content = self.buffer.text();
65 std::fs::write(path, content)?;
66 self.modified = false;
67 Ok(())
68 }
69
70 pub fn title(&self) -> String {
71 match &self.path {

Callers 2

save_currentMethod · 0.45
save_allMethod · 0.45

Calls 1

textMethod · 0.80

Tested by

no test coverage detected