MCPcopy Create free account
hub / github.com/cronitorio/cronitor-cli / Exists

Method Exists

lib/crontab.go:336–350  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

334}
335
336func (c Crontab) Exists() bool {
337
338 if c.IsUserCrontab {
339 cmd := c.buildCrontabCommand("-l")
340 if _, err := cmd.CombinedOutput(); err != nil {
341 return false
342 }
343 } else {
344 if _, err := os.Stat(c.Filename); os.IsNotExist(err) {
345 return false
346 }
347 }
348
349 return true
350}
351
352func (c Crontab) load() ([]string, int, error) {
353

Callers 6

GetAllCrontabsFunction · 0.80
discover.goFile · 0.80
processCrontabFunction · 0.80
handleGetCrontabsFunction · 0.80
handlePostCrontabsFunction · 0.80
handlePutCrontabsFunction · 0.80

Calls 1

buildCrontabCommandMethod · 0.95

Tested by

no test coverage detected