MCPcopy Create free account
hub / github.com/aptly-dev/aptly / Remove

Method Remove

files/package_pool.go:127–140  ·  view source on GitHub ↗

Remove deletes file in package pool returns its size

(path string)

Source from the content-addressed store, hash-verified

125
126// Remove deletes file in package pool returns its size
127func (pool *PackagePool) Remove(path string) (size int64, err error) {
128 pool.Lock()
129 defer pool.Unlock()
130
131 path = filepath.Join(pool.rootPath, path)
132
133 info, err := os.Stat(path)
134 if err != nil {
135 return 0, err
136 }
137
138 err = os.Remove(path)
139 return info.Size(), err
140}
141
142func (pool *PackagePool) ensureChecksums(poolPath, fullPoolPath string, checksumStorage aptly.ChecksumStorage) (targetChecksums *utils.ChecksumInfo, err error) {
143 targetChecksums, err = checksumStorage.Get(poolPath)

Callers

nothing calls this directly

Calls 3

StatMethod · 0.65
RemoveMethod · 0.65
SizeMethod · 0.65

Tested by

no test coverage detected