MCPcopy
hub / github.com/perkeep/perkeep / setRoot

Method setRoot

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

Source from the content-addressed store, hash-verified

180}
181
182func (c *serverCmd) setRoot() error {
183 if c.root == "" {
184 if root, err := rootInTmpDir(); err != nil {
185 return err
186 } else {
187 c.root = filepath.Join(root, "port"+c.port)
188 }
189 }
190 log.Printf("Temp dir root is %v", c.root)
191 if c.wipe {
192 log.Printf("Wiping %v", c.root)
193 if err := os.RemoveAll(c.root); err != nil {
194 return fmt.Errorf("Could not wipe %v: %v", c.root, err)
195 }
196 }
197 return nil
198}
199
200func (c *serverCmd) makeSuffixdir(fullpath string) {
201 if err := os.MkdirAll(fullpath, 0755); err != nil {

Callers 1

RunCommandMethod · 0.95

Calls 2

rootInTmpDirFunction · 0.85
PrintfMethod · 0.80

Tested by

no test coverage detected