- Sort Score
- Result 10 results
- Languages All
Results 41 - 50 of 85 for DirEntry (0.16 sec)
-
src/cmd/go/testdata/addmod.go
a.Files = []txtar.File{ {Name: ".mod", Data: mod}, {Name: ".info", Data: info}, } dir = filepath.Clean(dir) err = filepath.WalkDir(dir, func(path string, info fs.DirEntry, err error) error { if !info.Type().IsRegular() { return nil } name := info.Name() if name == "go.mod" || strings.HasSuffix(name, ".go") { data, err := os.ReadFile(path) if err != nil {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Aug 30 19:41:54 UTC 2023 - 3.5K bytes - Viewed (0) -
src/cmd/gofmt/long_test.go
testFile(t, b1, b2, filename) } done <- 0 } func genFilenames(t *testing.T, filenames chan<- string) { defer close(filenames) handleFile := func(filename string, d fs.DirEntry, err error) error { if err != nil { t.Error(err) return nil } // don't descend into testdata directories if isGoFile(d) && !strings.Contains(filepath.ToSlash(filename), "/testdata/") {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Sep 12 20:27:28 UTC 2023 - 3.8K bytes - Viewed (0) -
src/io/fs/sub.go
full, err := f.fullName("open", name) if err != nil { return nil, err } file, err := f.fsys.Open(full) return file, f.fixErr(err) } func (f *subFS) ReadDir(name string) ([]DirEntry, error) { full, err := f.fullName("read", name) if err != nil { return nil, err } dir, err := ReadDir(f.fsys, full) return dir, f.fixErr(err) } func (f *subFS) ReadFile(name string) ([]byte, error) {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Sat Feb 10 02:10:17 UTC 2024 - 3.6K bytes - Viewed (0) -
src/cmd/go/internal/vcweb/vcstest/vcstest_test.go
t.Logf("GET %s:\n%s", srv.URL, body) } resp.Body.Close() } if err != nil { t.Error(err) } srv.Close() }) err = filepath.WalkDir(scriptDir, func(path string, d fs.DirEntry, err error) error { if err != nil || d.IsDir() { return err } rel, err := filepath.Rel(scriptDir, path) if err != nil { return err } if rel == "README" { return nil
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Nov 11 16:04:21 UTC 2022 - 3.9K bytes - Viewed (0) -
src/cmd/go/internal/version/version.go
scanDir(arg) } else { scanFile(arg, info, true) } } } // scanDir scans a directory for binary to run scanFile on. func scanDir(dir string) { filepath.WalkDir(dir, func(path string, d fs.DirEntry, err error) error { if d.Type().IsRegular() || d.Type()&fs.ModeSymlink != 0 { info, err := d.Info() if err != nil { if *versionV { fmt.Fprintf(os.Stderr, "%s: %v\n", path, err) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 24 19:27:00 UTC 2023 - 4.8K bytes - Viewed (0) -
operator/pkg/helm/renderer.go
} return renderChart(h.namespace, values, h.chart, filter, h.version) } func GetFilesRecursive(f fs.FS, root string) ([]string, error) { res := []string{} err := fs.WalkDir(f, root, func(path string, d fs.DirEntry, err error) error { if err != nil { return err } if d.IsDir() { return nil } res = append(res, path) return nil }) return res, err }
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Wed Jul 13 01:59:17 UTC 2022 - 5K bytes - Viewed (0) -
pkg/util/filesystem/defaultfs.go
file, err := os.CreateTemp(fs.prefix(dir), prefix) if err != nil { return nil, err } return &defaultFile{file}, nil } // ReadDir via os.ReadDir func (fs *DefaultFs) ReadDir(dirname string) ([]os.DirEntry, error) { return os.ReadDir(fs.prefix(dirname)) } // Walk via filepath.Walk func (fs *DefaultFs) Walk(root string, walkFn filepath.WalkFunc) error { return filepath.Walk(fs.prefix(root), walkFn) }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue Oct 03 07:38:14 UTC 2023 - 4.7K bytes - Viewed (0) -
src/os/dir_unix.go
return &buf }, } func (d *dirInfo) close() { if d.buf != nil { dirBufPool.Put(d.buf) d.buf = nil } } func (f *File) readdir(n int, mode readdirMode) (names []string, dirents []DirEntry, infos []FileInfo, err error) { // If this file has no dirInfo, create one. d := f.dirinfo.Load() if d == nil { d = new(dirInfo) f.dirinfo.Store(d) } d.mu.Lock() defer d.mu.Unlock()
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue May 14 20:11:45 UTC 2024 - 4.8K bytes - Viewed (0) -
src/net/http/http_test.go
if !testenv.HasSrc() { t.Skip("source code not available") } re := regexp.MustCompile(`(strings|bytes).([A-Za-z]+)`) if err := fs.WalkDir(os.DirFS("."), ".", func(path string, d fs.DirEntry, err error) error { if err != nil { t.Fatal(err) } if path == "internal/ascii" { return fs.SkipDir } if !strings.HasSuffix(path, ".go") || strings.HasSuffix(path, "_test.go") ||
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Aug 22 18:18:19 UTC 2023 - 5.2K bytes - Viewed (0) -
pkg/kubelet/kuberuntime/kuberuntime_gc_test.go
podStateProvider.removed["789"] = struct{}{} podStateProvider.removed["654"] = struct{}{} ctrl := gomock.NewController(t) defer ctrl.Finish() fakeOS.ReadDirFn = func(string) ([]os.DirEntry, error) { var dirEntries []os.DirEntry for _, file := range files { mockDE := containertest.NewMockDirEntry(ctrl) mockDE.EXPECT().Name().Return(file) dirEntries = append(dirEntries, mockDE) } return dirEntries, nil
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Thu Mar 07 08:12:16 UTC 2024 - 20.6K bytes - Viewed (0)