- Sort Score
- Result 10 results
- Languages All
Results 41 - 50 of 184 for xreaddir (0.14 sec)
-
src/embed/embed.go
if file == nil { return nil, &fs.PathError{Op: "open", Path: name, Err: fs.ErrNotExist} } if file.IsDir() { return &openDir{file, f.readDir(name), 0}, nil } return &openFile{file, 0}, nil } // ReadDir reads and returns the entire named directory. func (f FS) ReadDir(name string) ([]fs.DirEntry, error) { file, err := f.Open(name) if err != nil { return nil, err } dir, ok := file.(*openDir)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon May 20 19:42:51 UTC 2024 - 13.5K bytes - Viewed (0) -
src/net/http/fs.go
// Prefer to use ReadDir instead of Readdir, // because the former doesn't require calling // Stat on every entry of a directory on Unix. var dirs anyDirs var err error if d, ok := f.(fs.ReadDirFile); ok { var list dirEntryDirs list, err = d.ReadDir(-1) dirs = list } else { var list fileInfoDirs list, err = f.Readdir(-1) dirs = list } if err != nil {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 09 17:06:47 UTC 2024 - 31.1K 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/cmd/vendor/golang.org/x/telemetry/internal/upload/findwork.go
// and uploading is supposed to be idempotent.) func (u *uploader) findWork() work { localdir, uploaddir := u.dir.LocalDir(), u.dir.UploadDir() var ans work fis, err := os.ReadDir(localdir) if err != nil { u.logger.Printf("Could not find work: failed to read local dir %s: %v", localdir, err) return ans } mode, asof := u.dir.Mode()
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 15 21:12:15 UTC 2024 - 3.4K 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) -
src/internal/poll/fd_opendir_darwin.go
// license that can be found in the LICENSE file. package poll import ( "syscall" _ "unsafe" // for go:linkname ) // OpenDir returns a pointer to a DIR structure suitable for // ReadDir. In case of an error, the name of the failed // syscall is returned along with a syscall.Errno. func (fd *FD) OpenDir() (uintptr, string, error) { // fdopendir(3) takes control of the file descriptor, // so use a dup.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Apr 05 17:54:15 UTC 2022 - 918 bytes - Viewed (0) -
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) -
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)