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

Function getFileSize

cmd/exec.go:320–330  ·  view source on GitHub ↗
(tempFile *os.File)

Source from the content-addressed store, hash-verified

318}
319
320func getFileSize(tempFile *os.File) (int64, error) {
321 // Known reasons stat could fail here:
322 // 1. temp file was removed by an external process
323 // 2. filesystem is no longer available
324
325 stat, err := os.Stat(tempFile.Name())
326 if err != nil {
327 return 0, err
328 }
329 return stat.Size(), nil
330}
331
332func gatherOutput(tempFile *os.File, truncateForPingOutput bool) []byte {
333 var outputBytes []byte

Callers 4

RunCommandFunction · 0.85
gatherOutputFunction · 0.85
handleRunJobFunction · 0.85
gatherOutputForDashFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected