- Sort Score
- Result 10 results
- Languages All
Results 31 - 40 of 134 for Readdir (0.37 sec)
-
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) -
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) -
src/testing/fstest/mapfs.go
return fs.ReadFile(fsOnly{fsys}, name) } func (fsys MapFS) Stat(name string) (fs.FileInfo, error) { return fs.Stat(fsOnly{fsys}, name) } func (fsys MapFS) ReadDir(name string) ([]fs.DirEntry, error) { return fs.ReadDir(fsOnly{fsys}, name) } func (fsys MapFS) Glob(pattern string) ([]string, error) { return fs.Glob(fsOnly{fsys}, pattern) } type noSub struct { MapFS }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:00:11 UTC 2024 - 7.1K bytes - Viewed (0) -
cni/pkg/install/binaries.go
// and returns a set of the filenames copied. func copyBinaries(srcDir string, targetDirs []string) (sets.String, error) { copiedFilenames := sets.String{} srcFiles, err := os.ReadDir(srcDir) if err != nil { return copiedFilenames, err } for _, f := range srcFiles { if f.IsDir() { continue } filename := f.Name() srcFilepath := filepath.Join(srcDir, filename)
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Mon Dec 11 19:10:54 UTC 2023 - 1.5K bytes - Viewed (0) -
pkg/kubelet/logs/container_log_manager_test.go
}() // This is a blocking call. But the above routine takes care of ensuring that this is terminated once the queue is shutdown c.processQueueItems(ctx, 1) timestamp := now.Format(timestampFormat) logs, err := os.ReadDir(dir) require.NoError(t, err) assert.Len(t, logs, 5) assert.Equal(t, testLogs[0], logs[0].Name()) assert.Equal(t, testLogs[1]+"."+timestamp, logs[1].Name()) assert.Equal(t, testLogs[4]+compressSuffix, logs[2].Name())
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Sat May 04 18:33:12 UTC 2024 - 12.7K bytes - Viewed (0) -
src/internal/goexperiment/mkconsts.go
package main import ( "bytes" "fmt" "internal/goexperiment" "log" "os" "reflect" "strings" ) func main() { // Delete existing experiment constant files. ents, err := os.ReadDir(".") if err != nil { log.Fatal(err) } for _, ent := range ents { name := ent.Name() if !strings.HasPrefix(name, "exp_") { continue } // Check that this is definitely a generated file.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Oct 19 23:33:27 UTC 2023 - 1.6K bytes - Viewed (0) -
src/cmd/go/testdata/script/test_fuzz_minimize_interesting.txt
wantLen, err := strconv.Atoi(os.Args[2]) if err != nil { fmt.Fprintln(os.Stderr, err) os.Exit(1) } testName := os.Args[1] dir := filepath.Join("testdata/fuzz", testName) files, err := ioutil.ReadDir(dir) if err != nil { fmt.Fprintln(os.Stderr, err) os.Exit(1) } if len(files) == 0 { fmt.Fprintf(os.Stderr, "expect at least one failure to be written to testdata\n") os.Exit(1) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Sep 05 23:35:32 UTC 2023 - 5.5K bytes - Viewed (0) -
src/cmd/go/testdata/script/test_fuzz_minimize_dirty_cov.txt
return true, nil } } return false, nil } var valRe = regexp.MustCompile(`^\[\]byte\(([^)]+)\)$`) func main() { dir, expected := os.Args[1], os.Args[2] ents, err := os.ReadDir(dir) if err != nil { fmt.Fprintln(os.Stderr, err) os.Exit(1) } for _, ent := range ents { name := filepath.Join(dir, ent.Name()) if good, err := checkFile(name, expected); err != nil {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Sep 27 01:16:19 UTC 2023 - 1.9K bytes - Viewed (0)