Easy Files - a library that makes working with files in Go enjoyable.
go get github.com/alexcoder04/ef
package main
import (
...
"github.com/alexcoder04/ef
)
func main(){
f := ef.NewFile("assets", "image.png")
if !f.Exists {
println("file does not exist")
return
}
println(f.PathAbs())
err := f.Copy("new/image.png")
if err != nil {
...
}
}
Please refer to pkg.go.dev.