- Sort Score
- Result 10 results
- Languages All
Results 41 - 50 of 198 for Readdir (0.12 sec)
-
src/cmd/go/testdata/script/test_fuzz_err_deadlock.txt
"testing" "time" ) func FuzzDead(f *testing.F) { go func() { c := filepath.Join(os.Getenv("GOCACHE"), "fuzz", "test", "FuzzDead") t := time.NewTicker(time.Second) for range t.C { files, _ := os.ReadDir(c) if len(files) > 0 { os.RemoveAll(c) } } }() f.Fuzz(func(t *testing.T, b []byte) { if len(b) == 8 && b[0] == 'h' && b[1] == 'e' && b[2] == 'l' && b[3] == 'l' &&
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Mar 16 19:51:23 UTC 2023 - 999 bytes - Viewed (0) -
src/os/os_test.go
t.Helper() fi, err := d.Readdir(n) if err != wantErr { t.Fatalf("Readdir of %d got error %v, want %v", n, err, wantErr) } if g, e := len(fi), want; g != e { t.Errorf("Readdir of %d got %d files, want %d", n, g, e) } } readDirExpect := func(n, want int, wantErr error) { t.Helper() de, err := d.ReadDir(n) if err != wantErr {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:00:11 UTC 2024 - 83.1K bytes - Viewed (0) -
src/os/stat_test.go
if parentdir == "" || base == "" { // skip os.Readdir test of files without directory or file name component, // such as directories with slash at the end or Windows device names. return } parent, err := os.Open(parentdir) if err != nil { t.Error(err) return } defer parent.Close() fis, err := parent.Readdir(-1) if err != nil { t.Error(err) return }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Apr 03 22:38:03 UTC 2024 - 7.8K bytes - Viewed (0) -
hack/conformance/check_conformance_test_requirements.go
} if checkFailed { return errors.New("We need to fix the above errors.") } return nil } func processFile(e2ePath string) error { regGoFile := regexp.MustCompile(`.*\.go`) files, err := os.ReadDir(e2ePath) if err != nil { return fmt.Errorf("Failed to read dir %s: %w", e2ePath, err) } for _, file := range files { if file.IsDir() { continue } if !regGoFile.MatchString(file.Name()) {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Fri Sep 29 06:30:57 UTC 2023 - 4.1K bytes - Viewed (0) -
src/image/png/fuzz_test.go
import ( "bytes" "image" "os" "path/filepath" "strings" "testing" ) func FuzzDecode(f *testing.F) { if testing.Short() { f.Skip("Skipping in short mode") } testdata, err := os.ReadDir("../testdata") if err != nil { f.Fatalf("failed to read testdata directory: %s", err) } for _, de := range testdata { if de.IsDir() || !strings.HasSuffix(de.Name(), ".png") { continue }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Aug 03 15:56:27 UTC 2023 - 1.6K bytes - Viewed (0) -
pkg/kubelet/container/testing/os.go
return nil } // Pipe is a fake call that returns nil. func (*FakeOS) Pipe() (r *os.File, w *os.File, err error) { return nil, nil, nil } // ReadDir is a fake call that returns the files under the directory. func (f *FakeOS) ReadDir(dirname string) ([]os.DirEntry, error) { if f.ReadDirFn != nil { return f.ReadDirFn(dirname) } return nil, nil }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue Feb 07 13:37:31 UTC 2023 - 3.7K bytes - Viewed (0) -
pkg/util/filesystem/filesystem.go
RemoveAll(path string) error Remove(name string) error // from "os" ReadFile(filename string) ([]byte, error) TempDir(dir, prefix string) (string, error) TempFile(dir, prefix string) (File, error) ReadDir(dirname string) ([]os.DirEntry, error) Walk(root string, walkFn filepath.WalkFunc) error } // File is an interface that we can use to mock various filesystem operations typically
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Thu Apr 13 01:02:46 UTC 2023 - 1.6K bytes - Viewed (0) -
src/image/jpeg/fuzz_test.go
import ( "bytes" "image" "os" "path/filepath" "strings" "testing" ) func FuzzDecode(f *testing.F) { if testing.Short() { f.Skip("Skipping in short mode") } testdata, err := os.ReadDir("../testdata") if err != nil { f.Fatalf("failed to read testdata directory: %s", err) } for _, de := range testdata { if de.IsDir() || !strings.HasSuffix(de.Name(), ".jpeg") { continue }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Aug 03 15:56:27 UTC 2023 - 1.4K bytes - Viewed (0) -
src/os/os_unix_test.go
d, err := Open(dir) if err != nil { t.Fatal(err) } defer d.Close() fis, err := d.Readdir(2) // notably, greater than zero if len(fis) == 0 && err == nil { // This is what used to happen (Issue 16919) t.Fatal("Readdir = empty slice & err == nil") } if len(fis) != 0 || err != io.EOF { t.Errorf("Readdir = %d entries: %v; want 0, io.EOF", len(fis), err) for i, fi := range fis {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Sep 18 17:32:43 UTC 2023 - 11.5K bytes - Viewed (0) -
src/os/dir_windows.go
return &buf }, } func (d *dirInfo) close() { d.h = 0 if d.buf != nil { dirBufPool.Put(d.buf) d.buf = nil } } // allowReadDirFileID indicates whether File.readdir should try to use FILE_ID_BOTH_DIR_INFO // if the underlying file system supports it. // Useful for testing purposes. var allowReadDirFileID = true func (d *dirInfo) init(h syscall.Handle) { d.h = h
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Apr 15 20:52:06 UTC 2024 - 7.7K bytes - Viewed (0)