- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 80 for DirEntry (0.13 sec)
-
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) -
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) -
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) -
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) -
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) -
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) -
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) -
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) -
src/io/fs/walk_test.go
}) return fsys } // Assumes that each node name is unique. Good enough for a test. // If clear is true, any incoming error is cleared before return. The errors // are always accumulated, though. func mark(entry DirEntry, err error, errors *[]error, clear bool) error { name := entry.Name() walkTree(tree, tree.name, func(path string, n *Node) { if n.name == name { n.mark++ } }) if err != nil {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Nov 18 15:21:18 UTC 2022 - 3K bytes - Viewed (0) -
src/crypto/x509/root_unix.go
return roots, nil } return nil, firstErr } // readUniqueDirectoryEntries is like os.ReadDir but omits // symlinks that point within the directory. func readUniqueDirectoryEntries(dir string) ([]fs.DirEntry, error) { files, err := os.ReadDir(dir) if err != nil { return nil, err } uniq := files[:0] for _, f := range files { if !isSameDirSymlink(f, dir) { uniq = append(uniq, f) } }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Apr 11 20:54:07 UTC 2023 - 2.7K bytes - Viewed (0)