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

Function ChecksumsForFile

utils/checksum.go:62–72  ·  view source on GitHub ↗

ChecksumsForFile generates size, MD5, SHA1 & SHA256 checksums for the file at the given path

(path string)

Source from the content-addressed store, hash-verified

60// ChecksumsForFile generates size, MD5, SHA1 & SHA256 checksums for the file at
61// the given path
62func ChecksumsForFile(path string) (ChecksumInfo, error) {
63 file, err := os.Open(path)
64 if err != nil {
65 return ChecksumInfo{}, err
66 }
67 defer func() {
68 _ = file.Close()
69 }()
70
71 return ChecksumsForReader(file)
72}
73
74// ChecksumWriter is a writer that does checksum calculation on the fly passing data
75// to real writer

Callers 11

ensureChecksumsMethod · 0.92
ImportMethod · 0.92
TestLinkFromPoolMethod · 0.92
ImportPackageFilesFunction · 0.92
PrepareMethod · 0.92
FinalizeMethod · 0.92
ImportMethod · 0.92
TestChecksumsForFileMethod · 0.85

Calls 3

ChecksumsForReaderFunction · 0.85
OpenMethod · 0.65
CloseMethod · 0.65