Search Options

Results per page
Sort
Preferred Languages
Advance

Results 41 - 50 of 88 for walkDir (0.26 sec)

  1. 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)
  2. src/cmd/internal/moddeps/moddeps_test.go

    		// Add a trailing separator to force that to happen.
    		root := testenv.GOROOT(t)
    		if !os.IsPathSeparator(root[len(root)-1]) {
    			root += string(filepath.Separator)
    		}
    		goroot.err = filepath.WalkDir(root, func(path string, info fs.DirEntry, err error) error {
    			if err != nil {
    				return err
    			}
    			if info.IsDir() && path != root && (info.Name() == "vendor" || info.Name() == "testdata") {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Feb 21 22:16:54 UTC 2024
    - 18.6K bytes
    - Viewed (0)
  3. cmd/kubeadm/app/util/users/users_linux.go

    }
    
    // UpdatePathOwner recursively updates the owners of a directory.
    // It is equivalent to calling `chown -R uid:gid /path/to/dir`.
    func UpdatePathOwner(dirPath string, uid, gid int64) error {
    	err := filepath.WalkDir(dirPath, func(path string, d os.DirEntry, err error) error {
    		if err := os.Chown(path, int(uid), int(gid)); err != nil {
    			return errors.Wrapf(err, "failed to update owner of %q to uid: %d and gid: %d", path, uid, gid)
    		}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Oct 25 16:35:10 UTC 2023
    - 20.7K bytes
    - Viewed (0)
  4. src/archive/tar/writer.go

    // It walks the directory tree starting at the root of the filesystem
    // adding each file to the tar archive while maintaining the directory structure.
    func (tw *Writer) AddFS(fsys fs.FS) error {
    	return fs.WalkDir(fsys, ".", 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
    		}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 19.6K bytes
    - Viewed (0)
  5. src/cmd/go/go_test.go

    	if !*testWork {
    		removeAll(testTmpDir) // os.Exit won't run defer
    	}
    
    	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
    			}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 81.1K bytes
    - Viewed (0)
  6. src/cmd/go/internal/script/cmds.go

    // needed in order to remove their contents.
    func removeAll(dir string) error {
    	// module cache has 0444 directories;
    	// make them writable in order to remove content.
    	filepath.WalkDir(dir, func(path string, info fs.DirEntry, err error) error {
    		// chmod not only directories, but also things that we couldn't even stat
    		// due to permission errors: they may also be unreadable directories.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Mar 26 19:58:28 UTC 2024
    - 28.5K bytes
    - Viewed (0)
  7. 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
    		}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue May 28 08:48:22 UTC 2024
    - 59.5K bytes
    - Viewed (0)
  8. cmd/kubelet/app/server.go

    	if err != nil {
    		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 {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Jun 07 00:05:34 UTC 2024
    - 53.9K bytes
    - Viewed (0)
  9. src/cmd/dist/build.go

    			bdst.WriteByte(0)
    		}
    	}
    	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"):
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 20 18:34:40 UTC 2024
    - 54K bytes
    - Viewed (0)
  10. src/cmd/dist/test.go

    		mode os.FileMode
    	}
    	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" {
    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