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

Method AutoSaveFilename

texteditor/buffer.go:566–573  ·  view source on GitHub ↗

AutoSaveFilename returns the autosave filename.

()

Source from the content-addressed store, hash-verified

564
565// AutoSaveFilename returns the autosave filename.
566func (tb *Buffer) AutoSaveFilename() string {
567 path, fn := filepath.Split(string(tb.Filename))
568 if fn == "" {
569 fn = "new_file"
570 }
571 asfn := filepath.Join(path, "#"+fn+"#")
572 return asfn
573}
574
575// autoSave does the autosave -- safe to call in a separate goroutine
576func (tb *Buffer) autoSave() error {

Callers 3

autoSaveMethod · 0.95
AutoSaveDeleteMethod · 0.95
AutoSaveCheckMethod · 0.95

Calls 1

SplitMethod · 0.80

Tested by

no test coverage detected