MCPcopy
hub / github.com/micro-editor/micro / RemoveBackup

Method RemoveBackup

internal/buffer/backup.go:148–154  ·  view source on GitHub ↗

RemoveBackup removes any backup file associated with this buffer

()

Source from the content-addressed store, hash-verified

146
147// RemoveBackup removes any backup file associated with this buffer
148func (b *SharedBuffer) RemoveBackup() {
149 if b.keepBackup() || b.Path == "" || b.Type != BTDefault {
150 return
151 }
152 f, resolveName := util.DetermineEscapePath(b.backupDir(), b.AbsPath)
153 b.removeBackup(f, resolveName)
154}
155
156// ApplyBackup applies the corresponding backup file to this buffer (if one exists)
157// Returns true if a backup was applied

Callers 2

handleBackupRequestFunction · 0.80
saveToFileMethod · 0.80

Calls 4

keepBackupMethod · 0.95
backupDirMethod · 0.95
removeBackupMethod · 0.95
DetermineEscapePathFunction · 0.92

Tested by

no test coverage detected