Search Options

Results per page
Sort
Preferred Languages
Advance

Results 41 - 50 of 61 for DirEntry (0.15 sec)

  1. src/net/http/fs.go

    func (d fileInfoDirs) len() int          { return len(d) }
    func (d fileInfoDirs) isDir(i int) bool  { return d[i].IsDir() }
    func (d fileInfoDirs) name(i int) string { return d[i].Name() }
    
    type dirEntryDirs []fs.DirEntry
    
    func (d dirEntryDirs) len() int          { return len(d) }
    func (d dirEntryDirs) isDir(i int) bool  { return d[i].IsDir() }
    func (d dirEntryDirs) name(i int) string { return d[i].Name() }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 09 17:06:47 UTC 2024
    - 31.1K bytes
    - Viewed (0)
  2. src/cmd/vendor/golang.org/x/build/relnote/relnote.go

    	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
    	})
    	if err != 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)
  3. src/cmd/go/internal/modfetch/fetch.go

    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()})
    			}
    		}
    		return nil
    	})
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 14:56:56 UTC 2024
    - 30.3K bytes
    - Viewed (0)
  4. src/index/suffixarray/suffixarray_test.go

    		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
    				}
    				data = append(data, file...)
    			}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 14.1K bytes
    - Viewed (0)
  5. src/os/file_unix.go

    		return d.info, nil
    	}
    	return lstat(d.parent + "/" + d.name)
    }
    
    func (d *unixDirent) String() string {
    	return fs.FormatDirEntry(d)
    }
    
    func newUnixDirent(parent, name string, typ FileMode) (DirEntry, error) {
    	ude := &unixDirent{
    		parent: parent,
    		name:   name,
    		typ:    typ,
    	}
    	if typ != ^FileMode(0) && !testingForceReadDirLstat {
    		return ude, nil
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 13:52:34 UTC 2024
    - 14.9K bytes
    - Viewed (0)
  6. src/path/filepath/path.go

    // Readdirnames.
    type WalkFunc func(path string, info fs.FileInfo, err error) error
    
    var lstat = os.Lstat // for testing
    
    // walkDir recursively descends path, calling walkDirFn.
    func walkDir(path string, d fs.DirEntry, walkDirFn fs.WalkDirFunc) error {
    	if err := walkDirFn(path, d, nil); err != nil || !d.IsDir() {
    		if err == SkipDir && d.IsDir() {
    			// Successfully skipped directory.
    			err = nil
    		}
    		return err
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 15.5K bytes
    - Viewed (0)
  7. 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)
  8. src/go/build/deps_test.go

    func listStdPkgs(goroot string) ([]string, error) {
    	// Based on cmd/go's matchPackages function.
    	var pkgs []string
    
    	src := filepath.Join(goroot, "src") + string(filepath.Separator)
    	walkFn := func(path string, d fs.DirEntry, err error) error {
    		if err != nil || !d.IsDir() || path == src {
    			return nil
    		}
    
    		base := filepath.Base(path)
    		if strings.HasPrefix(base, ".") || strings.HasPrefix(base, "_") || base == "testdata" {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 24 16:41:13 UTC 2024
    - 19.2K bytes
    - Viewed (0)
  9. src/cmd/internal/moddeps/moddeps_test.go

    		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") {
    				return filepath.SkipDir
    			}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Feb 21 22:16:54 UTC 2024
    - 18.6K bytes
    - Viewed (0)
  10. 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)
Back to top