MCPcopy
hub / github.com/mattermost/mattermost / CopyFile

Function CopyFile

server/channels/testlib/resources.go:114–123  ·  view source on GitHub ↗
(src, dst string)

Source from the content-addressed store, hash-verified

112}
113
114func CopyFile(src, dst string) error {
115 fileBackend, err := filestore.NewFileBackend(filestore.FileBackendSettings{DriverName: "local", Directory: ""})
116 if err != nil {
117 return errors.Wrapf(err, "failed to copy file %s to %s", src, dst)
118 }
119 if err = fileBackend.CopyFile(src, dst); err != nil {
120 return errors.Wrapf(err, "failed to copy file %s to %s", src, dst)
121 }
122 return nil
123}
124
125func SetupTestResources() (string, error) {
126 testResourcesToSetup := getTestResourcesToSetup()

Callers 1

SetupTestResourcesFunction · 0.70

Calls 1

CopyFileMethod · 0.95

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…