Remove deletes file in package pool returns its size
(path string)
| 125 | |
| 126 | // Remove deletes file in package pool returns its size |
| 127 | func (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 | |
| 142 | func (pool *PackagePool) ensureChecksums(poolPath, fullPoolPath string, checksumStorage aptly.ChecksumStorage) (targetChecksums *utils.ChecksumInfo, err error) { |
| 143 | targetChecksums, err = checksumStorage.Get(poolPath) |