MCPcopy
hub / github.com/rclone/rclone / Close

Method Close

backend/cache/storage_persistent.go:1027–1036  ·  view source on GitHub ↗

Close should be called when the program ends gracefully

()

Source from the content-addressed store, hash-verified

1025
1026// Close should be called when the program ends gracefully
1027func (b *Persistent) Close() {
1028 b.cleanupMux.Lock()
1029 defer b.cleanupMux.Unlock()
1030
1031 err := b.db.Close()
1032 if err != nil {
1033 fs.Errorf(b, "closing handle: %v", err)
1034 }
1035 b.open = false
1036}
1037
1038// itob returns an 8-byte big endian representation of v.
1039func itob(v int64) []byte {

Callers

nothing calls this directly

Calls 4

ErrorfFunction · 0.92
LockMethod · 0.65
UnlockMethod · 0.65
CloseMethod · 0.65

Tested by

no test coverage detected