Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 88 for walkDir (0.14 sec)

  1. src/cmd/gofmt/gofmt.go

    		}
    		in = f
    		defer func() {
    			f.Close()
    			<-fdSem
    		}()
    	}
    
    	// Compute the file's size and read its contents with minimal allocations.
    	//
    	// If we have the FileInfo from filepath.WalkDir, use it to make
    	// a buffer of the right size and avoid ReadAll's reallocations.
    	//
    	// If the size is unknown (or bogus, or overflows an int), fall back to
    	// a size-independent ReadAll.
    	size := -1
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 14 19:41:17 UTC 2024
    - 15.1K bytes
    - Viewed (0)
  2. pkg/volume/util/subpath/subpath_linux.go

    		// After go 1.16, WalkDir was introduced, it's more effective than Walk because the callback WalkDirFunc is called before
    		// reading a directory, making it save some time when a container's subPath contains lots of dirs.
    		// See https://github.com/kubernetes/kubernetes/pull/71804 and https://github.com/kubernetes/kubernetes/issues/107667 for more details.
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jul 12 14:09:11 UTC 2022
    - 21.4K bytes
    - Viewed (0)
  3. src/cmd/go/internal/toolchain/select.go

    			base.Fatalf("download %s: %v", gotoolchain, err)
    		}
    		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)
  4. src/cmd/go/internal/vcweb/vcweb.go

    	fmt.Fprintf(w, "For an overview of the script language, see <a href=\"/help\">/help</a>.\n\n")
    
    	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)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Jun 14 00:03:57 UTC 2023
    - 12.1K bytes
    - Viewed (0)
  5. cmd/metacache-set.go

    		readers[i] = newMetacacheReader(r)
    		d := disks[i]
    
    		// Send request to each disk.
    		go func() {
    			var werr error
    			if d == nil {
    				werr = errDiskNotFound
    			} else {
    				werr = d.WalkDir(ctx, WalkDirOptions{
    					Limit:          opts.perDiskLimit,
    					Bucket:         opts.bucket,
    					BaseDir:        opts.path,
    					Recursive:      opts.recursive,
    					ReportNotFound: opts.reportNotFound,
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Fri Jun 07 22:18:44 UTC 2024
    - 30.4K bytes
    - Viewed (0)
  6. src/cmd/vendor/golang.org/x/build/relnote/relnote.go

    		res = append(res, b)
    	}
    	// Remove empty headings at the end of the document.
    	rem(1)
    	return res
    }
    
    func sortedMarkdownFilenames(fsys fs.FS) ([]string, error) {
    	var filenames []string
    	err := fs.WalkDir(fsys, ".", func(path string, d fs.DirEntry, err error) error {
    		if err != nil {
    			return err
    		}
    		if !d.IsDir() && strings.HasSuffix(path, ".md") {
    			filenames = append(filenames, path)
    		}
    		return nil
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 04 16:19:04 UTC 2024
    - 12.7K bytes
    - Viewed (0)
  7. misc/go_android_exec/main.go

    			// contains nested modules this could push a lot of unnecessary contents,
    			// but for the golang.org/x repos it seems to be significantly (~2x)
    			// faster than copying one file at a time (via filepath.WalkDir),
    			// apparently due to high latency in 'adb' commands.
    			if err := adb("push", modDir, deviceModDir); err != nil {
    				return 0, err
    			}
    		} else {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Aug 21 17:46:57 UTC 2023
    - 15.3K bytes
    - Viewed (0)
  8. src/cmd/go/internal/modfetch/fetch.go

    // and its transitive contents.
    func makeDirsReadOnly(dir string) {
    	type pathMode struct {
    		path string
    		mode fs.FileMode
    	}
    	var dirs []pathMode // in lexical order
    	filepath.WalkDir(dir, func(path string, d fs.DirEntry, err error) error {
    		if err == nil && d.IsDir() {
    			info, err := d.Info()
    			if err == nil && info.Mode()&0222 != 0 {
    				dirs = append(dirs, pathMode{path, info.Mode()})
    			}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 14:56:56 UTC 2024
    - 30.3K bytes
    - Viewed (0)
  9. src/index/suffixarray/suffixarray_test.go

    	switch name {
    	case "opticks":
    		var err error
    		data, err = os.ReadFile("../../testdata/Isaac.Newton-Opticks.txt")
    		if err != nil {
    			return nil, err
    		}
    	case "go":
    		err := filepath.WalkDir("../..", func(path string, info fs.DirEntry, err error) error {
    			if err == nil && strings.HasSuffix(path, ".go") && !info.IsDir() {
    				file, err := os.ReadFile(path)
    				if err != nil {
    					return err
    				}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 14.1K bytes
    - Viewed (0)
  10. src/go/build/deps_test.go

    		if name == "builtin" || name == "cmd" {
    			return filepath.SkipDir
    		}
    
    		pkgs = append(pkgs, strings.TrimPrefix(name, "vendor/"))
    		return nil
    	}
    	if err := filepath.WalkDir(src, walkFn); err != nil {
    		return nil, err
    	}
    	return pkgs, nil
    }
    
    func TestDependencies(t *testing.T) {
    	if !testenv.HasSrc() {
    		// Tests run in a limited file system and we do not
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 24 16:41:13 UTC 2024
    - 19.2K bytes
    - Viewed (0)
Back to top