MCPcopy Index your code
hub / github.com/wavetermdev/waveterm / isFileEmpty

Function isFileEmpty

pkg/jobcontroller/jobcontroller.go:1559–1572  ·  view source on GitHub ↗
(ctx context.Context, blockId string)

Source from the content-addressed store, hash-verified

1557}
1558
1559func isFileEmpty(ctx context.Context, blockId string) bool {
1560 if blockId == "" {
1561 return true
1562 }
1563 file, statErr := filestore.WFS.Stat(ctx, blockId, JobOutputFileName)
1564 if statErr == fs.ErrNotExist {
1565 return true
1566 }
1567 if statErr != nil {
1568 log.Printf("error statting block output file: %v\n", statErr)
1569 return true
1570 }
1571 return file.Size == 0
1572}
1573
1574func writeSessionSeparatorToTerminal(blockId string, termWidth int) {
1575 if blockId == "" {

Callers 2

resetTerminalStateFunction · 0.85

Calls 1

StatMethod · 0.80

Tested by

no test coverage detected