https://github.com/flopp/go-filehash
Combute hash/checksum of files, insert file hash/checksum into file name
https://github.com/flopp/go-filehash
Last synced: 9 months ago
JSON representation
Combute hash/checksum of files, insert file hash/checksum into file name
- Host: GitHub
- URL: https://github.com/flopp/go-filehash
- Owner: flopp
- License: mit
- Created: 2024-04-18T14:32:14.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2025-03-13T11:30:09.000Z (about 1 year ago)
- Last Synced: 2025-03-13T12:31:46.164Z (about 1 year ago)
- Language: Go
- Size: 7.81 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# go-filehash
Compute hash/checksum of files, insert file hash/checksum into file name while copying
```
import "filehash"
hash, err := filehash.Compute("myfile.txt")
// Returns "95c39c37ef89acb2", nil
newName, err := filehash.Copy("myfile.txt", "out/myfile-HASH.txt", "HASH")
// Copies "myfile.txt" to "out/myfile-95c39c37ef89acb2.txt"
// Returns "out/myfile-95c39c37ef89acb2.txt", nil
```