Categorygithub.com/botherder/go-files
repositorypackage
0.0.0-20180205213231-2246e61e05ec
Repository: https://github.com/botherder/go-files.git
Documentation: pkg.go.dev

# README

go-files

Collection of functions to help with operation with and on files.

Usage

Copy a file:

err := files.Copy("/path/to/src", "/path/to/dir")

Hash a file:

hash, err := files.HashFile("/path/to/file", "sha512")

Hash a string:

hash, err := files.HashString("test123", "md5")

On Windows, expand paths:

path := files.ExpandWindows("%ProgramFiles%\\Application\\file.exe")

License

Released under MIT license.