Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 9 of 9 for DirEntry (0.67 sec)

  1. 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)
  2. src/os/os_test.go

    	// explicitly setting that. Otherwise it might get out of sync with FindFirstFile. See golang.org/issues/42637.
    	if err := filepath.WalkDir(path, func(path string, d fs.DirEntry, err error) error {
    		if err != nil {
    			t.Fatal(err)
    		}
    		info, err := d.Info()
    		if err != nil {
    			t.Fatal(err)
    		}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 83.1K bytes
    - Viewed (0)
  3. src/go/build/build.go

    }
    
    // readDir calls ctxt.ReadDir (if not nil) or else os.ReadDir.
    func (ctxt *Context) readDir(path string) ([]fs.DirEntry, error) {
    	// TODO: add a fs.DirEntry version of Context.ReadDir
    	if f := ctxt.ReadDir; f != nil {
    		fis, err := f(path)
    		if err != nil {
    			return nil, err
    		}
    		des := make([]fs.DirEntry, len(fis))
    		for i, fi := range fis {
    			des[i] = fs.FileInfoToDirEntry(fi)
    		}
    		return des, nil
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 16:25:21 UTC 2024
    - 62.3K bytes
    - Viewed (0)
  4. src/cmd/go/go_test.go

    	}
    
    	if !*testWork {
    		// There shouldn't be anything left in topTmpdir.
    		var extraFiles, extraDirs []string
    		err := filepath.WalkDir(topTmpdir, func(path string, d fs.DirEntry, err error) error {
    			if err != nil {
    				return err
    			}
    			if path == topTmpdir {
    				return nil
    			}
    
    			if rel, err := filepath.Rel(topTmpdir, path); err == nil {
    				path = rel
    			}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 81.1K bytes
    - Viewed (0)
  5. src/cmd/internal/testdir/testdir_test.go

    }
    
    func (t test) goDirName() string {
    	return filepath.Join(t.dir, strings.Replace(t.goFile, ".go", ".dir", -1))
    }
    
    // goDirFiles returns .go files in dir.
    func goDirFiles(dir string) (filter []fs.DirEntry, _ error) {
    	files, err := os.ReadDir(dir)
    	if err != nil {
    		return nil, err
    	}
    	for _, goFile := range files {
    		if filepath.Ext(goFile.Name()) == ".go" {
    			filter = append(filter, goFile)
    		}
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Mar 21 20:08:06 UTC 2024
    - 57.5K bytes
    - Viewed (0)
  6. staging/src/k8s.io/apiextensions-apiserver/test/integration/ratcheting_test.go

    // they are all added to the returned slice.
    func loadObjects(dir string) []*unstructured.Unstructured {
    	result := []*unstructured.Unstructured{}
    	err := filepath.WalkDir(dir, func(path string, d fs.DirEntry, err error) error {
    		if err != nil {
    			return err
    		} else if d.IsDir() {
    			return nil
    		} else if filepath.Ext(d.Name()) != ".yaml" {
    			return nil
    		}
    		// Read the file in as []byte
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue May 28 08:48:22 UTC 2024
    - 59.5K bytes
    - Viewed (0)
  7. cmd/kubelet/app/server.go

    		return fmt.Errorf("failed to marshal base config: %w", err)
    	}
    	// Walk through the drop-in directory and update the configuration for each file
    	if err := filepath.WalkDir(kubeletDropInConfigDir, func(path string, info fs.DirEntry, err error) error {
    		if err != nil {
    			return err
    		}
    		if !info.IsDir() && filepath.Ext(info.Name()) == dropinFileExtension {
    			dropinConfigJSON, err := loadDropinConfigFileIntoJSON(path)
    			if err != nil {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Jun 07 00:05:34 UTC 2024
    - 53.9K bytes
    - Viewed (0)
  8. src/cmd/dist/build.go

    	}
    	writefile(bdst.String(), dst, 0)
    }
    
    func clean() {
    	generated := []byte(generatedHeader)
    
    	// Remove generated source files.
    	filepath.WalkDir(pathf("%s/src", goroot), func(path string, d fs.DirEntry, err error) error {
    		switch {
    		case err != nil:
    			// ignore
    		case d.IsDir() && (d.Name() == "vendor" || d.Name() == "testdata"):
    			return filepath.SkipDir
    		case d.IsDir() && d.Name() != "dist":
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 20 18:34:40 UTC 2024
    - 54K bytes
    - Viewed (0)
  9. src/cmd/dist/test.go

    	var dirs []pathMode // in lexical order
    
    	undo = func() {
    		for i := range dirs {
    			os.Chmod(dirs[i].path, dirs[i].mode) // best effort
    		}
    	}
    
    	filepath.WalkDir(dir, func(path string, d fs.DirEntry, err error) error {
    		if suffix := strings.TrimPrefix(path, dir+string(filepath.Separator)); suffix != "" {
    			if suffix == ".git" {
    				// Leave Git metadata in whatever state it was in. It may contain a lot
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 20 16:01:35 UTC 2024
    - 50K bytes
    - Viewed (0)
Back to top