go-ape provides some file utilities in two packages:
pkg/filecopy
for copying files (hence the "ape" in "go-ape")pkg/furl
for reading local files and remote urls in a consistent way
It was initially developed on macOS and then made to work on Windows.
Install is easy, all you need to do is
go get github.com/pivotal/go-ape
Once installed, import go-ape in your application
import "github.com/pivotal/go-ape"
Then start reading files like so:
content, err := furl.Read(filePath, "")
Here filePath can be a path on the local file system (unix OR windows) or a URL.
You can copy files or directories using:
filecopy.Copy(outputPath, inputPath)
Please see the godoc for more information.
https://github.com/otiai10/copy copies files and directories, but incompatibly to go-ape (replacing the implementation here with otiai10/copy caused numerous test failures).