MCPcopy Create free account
hub / github.com/AdRoll/baker / move

Method move

upload/s3.go:189–203  ·  view source on GitHub ↗
(sourceFilePath string)

Source from the content-addressed store, hash-verified

187}
188
189func (u *S3) move(sourceFilePath string) error {
190 relPath, err := filepath.Rel(u.Cfg.SourceBasePath, sourceFilePath)
191 if err != nil {
192 return err
193 }
194
195 destinationPath := filepath.Join(u.Cfg.StagingPath, relPath)
196
197 dir := path.Dir(destinationPath)
198 if err := os.MkdirAll(dir, 0777); err != nil {
199 return err
200 }
201
202 return os.Rename(sourceFilePath, destinationPath)
203}
204
205func (u *S3) Stop() {
206 // Stop may be called by the Topology in case of early exit (i.e CTRL-C),

Callers 2

RunMethod · 0.95
TestS3_moveFunction · 0.95

Calls

no outgoing calls

Tested by 1

TestS3_moveFunction · 0.76