Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 45 for DirEntry (0.41 sec)

  1. src/go/doc/headscan.go

    		list = append(list, inner)
    	}
    	return list
    }
    
    func main() {
    	flag.Parse()
    	fset := token.NewFileSet()
    	nheadings := 0
    	err := filepath.WalkDir(*root, func(path string, info fs.DirEntry, err error) error {
    		if !info.IsDir() {
    			return nil
    		}
    		pkgs, err := parser.ParseDir(fset, path, isGoFile, parser.ParseComments)
    		if err != nil {
    			if *verbose {
    				fmt.Fprintln(os.Stderr, err)
    			}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Sep 06 21:50:52 UTC 2022
    - 2.5K bytes
    - Viewed (0)
  2. src/compress/gzip/issue14937_test.go

    	}
    
    	goroot, err := filepath.EvalSymlinks(runtime.GOROOT())
    	if err != nil {
    		t.Fatal("error evaluating GOROOT: ", err)
    	}
    	var files []string
    	err = filepath.WalkDir(goroot, func(path string, info fs.DirEntry, err error) error {
    		if err != nil {
    			return err
    		}
    		if !info.IsDir() && strings.HasSuffix(path, ".gz") {
    			files = append(files, path)
    		}
    		return nil
    	})
    	if err != nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Apr 10 16:37:53 UTC 2024
    - 2K bytes
    - Viewed (0)
  3. src/os/dir_darwin.go

    }
    
    func (d *dirInfo) close() {
    	if d.dir == 0 {
    		return
    	}
    	closedir(d.dir)
    	d.dir = 0
    }
    
    func (f *File) readdir(n int, mode readdirMode) (names []string, dirents []DirEntry, infos []FileInfo, err error) {
    	// If this file has no dirinfo, create one.
    	var d *dirInfo
    	for {
    		d = f.dirinfo.Load()
    		if d != nil {
    			break
    		}
    		dir, call, errno := f.pfd.OpenDir()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Apr 15 20:52:06 UTC 2024
    - 3.5K bytes
    - Viewed (0)
  4. src/io/ioutil/ioutil.go

    // ReadDir returns no directory entries along with the error.
    //
    // Deprecated: As of Go 1.16, [os.ReadDir] is a more efficient and correct choice:
    // it returns a list of [fs.DirEntry] instead of [fs.FileInfo],
    // and it returns partial results in the case of an error
    // midway through reading a directory.
    //
    // If you must continue obtaining a list of [fs.FileInfo], you still can:
    //
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 3.2K bytes
    - Viewed (0)
  5. 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)
  6. 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)
  7. 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)
  8. 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)
  9. 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)
  10. 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)
Back to top