- Sort Score
- Result 10 results
- Languages All
Results 51 - 60 of 85 for DirEntry (0.12 sec)
-
src/cmd/distpack/archive.go
// The archive can be amended afterward using methods like Add and Filter. func NewArchive(dir string) (*Archive, error) { a := new(Archive) err := fs.WalkDir(os.DirFS(dir), ".", func(name string, d fs.DirEntry, err error) error { if err != nil { return err } if d.IsDir() { return nil } info, err := d.Info() if err != nil { return err } a.Add(name, filepath.Join(dir, name), info)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Aug 11 17:37:52 UTC 2023 - 5.9K bytes - Viewed (0) -
src/cmd/gofmt/gofmt.go
// It's only -r that makes use of go/ast's object resolution, // so avoid the unnecessary work if the flag isn't used. if *rewriteRule == "" { parserMode |= parser.SkipObjectResolution } } func isGoFile(f fs.DirEntry) bool { // ignore non-Go files name := f.Name() return !strings.HasPrefix(name, ".") && strings.HasSuffix(name, ".go") && !f.IsDir() } // A sequencer performs concurrent tasks that may write output, but emits that
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue May 14 19:41:17 UTC 2024 - 15.1K bytes - Viewed (0) -
internal/store/queuestore.go
return l, nil } // list will read all entries from disk. // Entries are returned sorted by modtime, oldest first. // Underlying entry list in store is *not* updated. func (store *QueueStore[_]) list() ([]os.DirEntry, error) { files, err := os.ReadDir(store.directory) if err != nil { return nil, err } // Sort the entries. sort.Slice(files, func(i, j int) bool { ii, err := files[i].Info()
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Mon Mar 25 16:44:20 UTC 2024 - 7.1K bytes - Viewed (0) -
pkg/kubelet/stats/cri_stats_provider_test.go
} ctrl := gomock.NewController(t) defer ctrl.Finish() fakeOS := &kubecontainertest.FakeOS{} fakeOS.ReadDirFn = func(path string) ([]os.DirEntry, error) { var dirEntries []os.DirEntry mockDE := kubecontainertest.NewMockDirEntry(ctrl) switch path { case kuberuntime.BuildPodLogsDirectory(testPodLogDirectory, "sandbox0-ns", "sandbox0-name", types.UID("sandbox0-uid")):
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Thu Apr 25 14:24:16 UTC 2024 - 54.5K bytes - Viewed (0) -
src/path/filepath/path_test.go
}) } // Assumes that each node name is unique. Good enough for a test. // If clear is true, any incoming error is cleared before return. The errors // are always accumulated, though. func mark(d fs.DirEntry, err error, errors *[]error, clear bool) error { name := d.Name() walkTree(tree, tree.name, func(path string, n *Node) { if n.name == name { n.mark++ } }) if err != nil {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Mar 22 16:38:19 UTC 2024 - 47.1K bytes - Viewed (0) -
pkg/kubelet/volumemanager/reconciler/reconstruct_common.go
volumesDirs[v1.PersistentVolumeBlock] = filepath.Join(podDir, config.DefaultKubeletVolumeDevicesDirName) for volumeMode, volumesDir := range volumesDirs { var volumesDirInfo []fs.DirEntry if volumesDirInfo, err = os.ReadDir(volumesDir); err != nil { // Just skip the loop because given volumesDir doesn't exist depending on volumeMode continue } for _, volumeDir := range volumesDirInfo {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue Apr 09 07:34:33 UTC 2024 - 14.1K bytes - Viewed (0) -
cni/test/install_cni.go
} func ls(dir string, t *testing.T) []string { files, err := os.ReadDir(dir) t.Helper() if err != nil { t.Fatalf("Failed to list files, err: %v", err) } return slices.Map(files, func(e os.DirEntry) string { return e.Name() }) } func cp(src, dest string, t *testing.T) { t.Helper() data, err := os.ReadFile(src) if err != nil { t.Fatalf("Failed to read file %v, err: %v", src, err) }
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Tue May 21 18:32:01 UTC 2024 - 11.4K bytes - Viewed (0) -
pkg/log/config_test.go
log.Println(line) } } wg.Done() }() } wg.Wait() Sync() ticker := time.NewTicker(100 * time.Millisecond) defer ticker.Stop() var rd []os.DirEntry for { select { case <-ticker.C: rd, err := os.ReadDir(dir) if err != nil { t.Fatalf("Unable to read dir: %v", err) } if len(rd) == o.RotationMaxBackups+1 {
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Tue Mar 26 20:38:10 UTC 2024 - 10.9K bytes - Viewed (0) -
src/cmd/go/internal/toolchain/select.go
} if info.Mode()&0111 == 0 { // allowExec sets the exec permission bits on all files found in dir. allowExec := func(dir string) { err := filepath.WalkDir(dir, func(path string, d fs.DirEntry, err error) error { if err != nil { return err } if !d.IsDir() { info, err := os.Stat(path) if err != nil { return err }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue May 07 17:25:05 UTC 2024 - 23.4K bytes - Viewed (0) -
src/cmd/go/internal/vcweb/vcweb.go
fmt.Fprintf(w, "<b>cache</b>\n") tw := tabwriter.NewWriter(w, 1, 8, 1, '\t', 0) err := filepath.WalkDir(s.scriptDir, func(path string, d fs.DirEntry, err error) error { if err != nil { return err } if filepath.Ext(path) != ".txt" { return nil } rel, err := filepath.Rel(s.scriptDir, path) if err != nil { return err
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Jun 14 00:03:57 UTC 2023 - 12.1K bytes - Viewed (0)