Recursively copy Go virtual file systems, such as gobindata, vfsgen, and http.FileSystem.
Go to file
AJ ONeal 9dcf11d07a vendor deps for tests 2020-10-23 15:21:36 -06:00
fixtures tested working (for proper implementations) 2020-10-23 15:21:19 -06:00
internal/tools tested working (for proper implementations) 2020-10-23 15:21:19 -06:00
vendor vendor deps for tests 2020-10-23 15:21:36 -06:00
.gitignore tested working (for proper implementations) 2020-10-23 15:21:19 -06:00
README.md tested working (for proper implementations) 2020-10-23 15:21:19 -06:00
copy.go tested working (for proper implementations) 2020-10-23 15:21:19 -06:00
copy_test.go tested working (for proper implementations) 2020-10-23 15:21:19 -06:00
go.mod tested working (for proper implementations) 2020-10-23 15:21:19 -06:00
go.sum tested working (for proper implementations) 2020-10-23 15:21:19 -06:00
options.go tested working (for proper implementations) 2020-10-23 15:21:19 -06:00
vfs.go tested working (for proper implementations) 2020-10-23 15:21:19 -06:00

README.md

vfscopy

Copy a Virtual FileSystem, such as http.FileSystem, recursively to a native file system destination.

httpfs := http.Dir("/tmp/public/")
vfs := vfscopy.NewVFS(httpfs)

if err := Copy(vfs, ".", "/tmp/dst/"); nil != err {
    fmt.Fprintf(os.Stderr, "couldn't copy vfs: %v\n", err)
}

Test

go generate ./...
go test ./...