MCPcopy Create free account
hub / github.com/github/copilot-sdk / waitForFile

Function waitForFile

go/internal/e2e/session_fs_e2e_test.go:505–514  ·  view source on GitHub ↗
(path string, timeout time.Duration)

Source from the content-addressed store, hash-verified

503}
504
505func waitForFile(path string, timeout time.Duration) error {
506 deadline := time.Now().Add(timeout)
507 for time.Now().Before(deadline) {
508 if _, err := os.Stat(path); err == nil {
509 return nil
510 }
511 time.Sleep(50 * time.Millisecond)
512 }
513 return fmt.Errorf("file did not appear: %s", path)
514}
515
516func waitForFileContent(path string, needle string, timeout time.Duration) error {
517 deadline := time.Now().Add(timeout)

Callers 1

TestSessionFSE2EFunction · 0.85

Calls 2

StatMethod · 0.65
AddMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…