MCPcopy
hub / github.com/perkeep/perkeep / syncTemplateBlobs

Method syncTemplateBlobs

dev/devcam/server.go:391–406  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

389}
390
391func (c *serverCmd) syncTemplateBlobs() error {
392 if c.wipe {
393 templateDir := "dev-server-template"
394 if _, err := os.Stat(templateDir); err != nil {
395 if os.IsNotExist(err) {
396 return nil
397 }
398 return err
399 }
400 blobsDir := filepath.Join(c.root, "sha1")
401 if err := cpDir(templateDir, blobsDir, nil); err != nil {
402 return fmt.Errorf("Could not cp template blobs: %v", err)
403 }
404 }
405 return nil
406}
407
408func (c *serverCmd) setFullClosure() error {
409 if c.fullClosure {

Callers 1

RunCommandMethod · 0.95

Calls 2

cpDirFunction · 0.70
StatMethod · 0.65

Tested by

no test coverage detected