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

Method AutoSaveCheck

texteditor/buffer.go:603–609  ·  view source on GitHub ↗

AutoSaveCheck checks if an autosave file exists; logic for dealing with it is left to larger app; call this before opening a file.

()

Source from the content-addressed store, hash-verified

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.
603func (tb *Buffer) AutoSaveCheck() bool {
604 asfn := tb.AutoSaveFilename()
605 if _, err := os.Stat(asfn); os.IsNotExist(err) {
606 return false // does not exist
607 }
608 return true
609}
610
611/////////////////////////////////////////////////////////////////////////////
612// Appending Lines

Callers

nothing calls this directly

Calls 2

AutoSaveFilenameMethod · 0.95
StatMethod · 0.45

Tested by

no test coverage detected