MCPcopy Create free account
hub / github.com/cogentcore/core / AutoSaveDelete

Method AutoSaveDelete

texteditor/buffer.go:592–599  ·  view source on GitHub ↗

AutoSaveDelete deletes any existing autosave file

()

Source from the content-addressed store, hash-verified

590
591// AutoSaveDelete deletes any existing autosave file
592func (tb *Buffer) AutoSaveDelete() {
593 asfn := tb.AutoSaveFilename()
594 err := os.Remove(asfn)
595 // the file may not exist, which is fine
596 if err != nil && !errors.Is(err, fs.ErrNotExist) {
597 errors.Log(err)
598 }
599}
600
601// AutoSaveCheck checks if an autosave file exists; logic for dealing with
602// it is left to larger app; call this before opening a file.

Callers 4

editDoneMethod · 0.95
RevertMethod · 0.95
CloseMethod · 0.95
undoMethod · 0.95

Calls 3

AutoSaveFilenameMethod · 0.95
IsFunction · 0.92
LogFunction · 0.92

Tested by

no test coverage detected