Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 63 for DirEntry (0.22 sec)

  1. src/os/dir_plan9.go

    			if mode == readdirDirEntry {
    				dirents = append(dirents, dirEntry{f})
    			} else {
    				infos = append(infos, f)
    			}
    		}
    		d.bufp += m
    		n--
    	}
    
    	if n > 0 && len(names)+len(dirents)+len(infos) == 0 {
    		return nil, nil, nil, io.EOF
    	}
    	return names, dirents, infos, nil
    }
    
    type dirEntry struct {
    	fs *fileStat
    }
    
    func (de dirEntry) Name() string            { return de.fs.Name() }
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Apr 15 20:52:06 UTC 2024
    - 2.1K bytes
    - Viewed (0)
  2. src/io/fs/readdir.go

    	ReadDir(name string) ([]DirEntry, error)
    }
    
    // ReadDir reads the named directory
    // and returns a list of directory entries sorted by filename.
    //
    // If fs implements [ReadDirFS], ReadDir calls fs.ReadDir.
    // Otherwise ReadDir calls fs.Open and uses ReadDir and Close
    // on the returned file.
    func ReadDir(fsys FS, name string) ([]DirEntry, error) {
    	if fsys, ok := fsys.(ReadDirFS); ok {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 1.9K bytes
    - Viewed (0)
  3. src/os/dir.go

    		names = []string{}
    	}
    	return names, err
    }
    
    // A DirEntry is an entry read from a directory
    // (using the [ReadDir] function or a [File.ReadDir] method).
    type DirEntry = fs.DirEntry
    
    // ReadDir reads the contents of the directory associated with the file f
    // and returns a slice of [DirEntry] values in directory order.
    // Subsequent calls on the same file will yield later DirEntry records in the directory.
    //
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 6.1K bytes
    - Viewed (0)
  4. src/io/fs/readdir_test.go

    			if err != nil {
    				t.Fatal(err)
    			}
    
    			dirEntry := FileInfoToDirEntry(fi)
    			if g, w := dirEntry.Type(), test.wantMode; g != w {
    				t.Errorf("FileMode mismatch: got=%v, want=%v", g, w)
    			}
    			if g, w := dirEntry.Name(), test.path; g != w {
    				t.Errorf("Name mismatch: got=%v, want=%v", g, w)
    			}
    			if g, w := dirEntry.IsDir(), test.wantDir; g != w {
    				t.Errorf("IsDir mismatch: got=%v, want=%v", g, w)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Nov 27 16:25:41 UTC 2023
    - 2.6K bytes
    - Viewed (0)
  5. src/os/dir_windows.go

    				if mode == readdirDirEntry {
    					dirents = append(dirents, dirEntry{f})
    				} else {
    					infos = append(infos, f)
    				}
    			}
    			n--
    		}
    	}
    	if !wantAll && len(names)+len(dirents)+len(infos) == 0 {
    		return nil, nil, nil, io.EOF
    	}
    	return names, dirents, infos, nil
    }
    
    type dirEntry struct {
    	fs *fileStat
    }
    
    func (de dirEntry) Name() string            { return de.fs.Name() }
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Apr 15 20:52:06 UTC 2024
    - 7.7K bytes
    - Viewed (0)
  6. src/io/fs/walk.go

    //     for that directory to report the error.
    type WalkDirFunc func(path string, d DirEntry, err error) error
    
    // walkDir recursively descends path, calling walkDirFn.
    func walkDir(fsys FS, name string, d DirEntry, walkDirFn WalkDirFunc) error {
    	if err := walkDirFn(name, d, nil); err != nil || !d.IsDir() {
    		if err == SkipDir && d.IsDir() {
    			// Successfully skipped directory.
    			err = nil
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jan 09 08:50:19 UTC 2024
    - 4.7K bytes
    - Viewed (0)
  7. src/io/fs/fs.go

    type ReadDirFile interface {
    	File
    
    	// ReadDir reads the contents of the directory and returns
    	// a slice of up to n DirEntry values in directory order.
    	// Subsequent calls on the same file will yield further DirEntry values.
    	//
    	// If n > 0, ReadDir returns at most n DirEntry structures.
    	// In this case, if ReadDir returns an empty slice, it will return
    	// a non-nil error explaining why.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jan 15 21:21:41 UTC 2024
    - 9.4K bytes
    - Viewed (0)
  8. src/internal/goroot/gc.go

    	machine := strings.TrimSpace(string(machineB))
    
    	dirsEntries := strings.Split(string(allDirs), "\n")
    	const prefix = "libraries: ="
    	var dirs []string
    	for _, dirEntry := range dirsEntries {
    		if strings.HasPrefix(dirEntry, prefix) {
    			dirs = filepath.SplitList(strings.TrimPrefix(dirEntry, prefix))
    			break
    		}
    	}
    	if len(dirs) == 0 {
    		return
    	}
    
    	var lastDirs []string
    	for _, dir := range dirs {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Feb 08 18:16:28 UTC 2024
    - 3.2K bytes
    - Viewed (0)
  9. subprojects/core/src/main/java/org/gradle/api/internal/tasks/BaseSnapshotInputsBuildOperationResult.java

                }
    
                public String getHash() {
                    return hash;
                }
            }
    
            static class DirEntry extends Entry {
    
                private final List<Entry> children = new ArrayList<>();
    
                DirEntry(String path) {
                    super(path);
                }
    
                public Collection<Entry> getChildren() {
                    return children;
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Mon Feb 05 11:36:42 UTC 2024
    - 14.9K bytes
    - Viewed (0)
  10. src/io/fs/format.go

    	}
    
    	return string(b)
    }
    
    // FormatDirEntry returns a formatted version of dir for human readability.
    // Implementations of [DirEntry] can call this from a String method.
    // The outputs for a directory named subdir and a file named hello.go are:
    //
    //	d subdir/
    //	- hello.go
    func FormatDirEntry(dir DirEntry) string {
    	name := dir.Name()
    	b := make([]byte, 0, 5+len(name))
    
    	// The Type method does not return any permission bits,
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Oct 18 19:34:35 UTC 2023
    - 1.7K bytes
    - Viewed (0)
Back to top