- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 10 for WalkFn (0.12 sec)
-
src/path/filepath/path.go
} return nil } // walk recursively descends path, calling walkFn. func walk(path string, info fs.FileInfo, walkFn WalkFunc) error { if !info.IsDir() { return walkFn(path, info, nil) } names, err := readDirNames(path) err1 := walkFn(path, info, err) // If err != nil, walk can't walk into this directory. // err1 != nil means walkFn want walk to skip this directory or stop walking.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:00:11 UTC 2024 - 15.5K bytes - Viewed (0) -
src/cmd/go/internal/fsys/fsys.go
return false, firstErr } // walk recursively descends path, calling walkFn. Copied, with some // modifications from path/filepath.walk. func walk(path string, info fs.FileInfo, walkFn filepath.WalkFunc) error { if err := walkFn(path, info, nil); err != nil || !info.IsDir() { return err } fis, err := ReadDir(path) if err != nil { return walkFn(path, info, err) } for _, fi := range fis {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Jun 06 18:35:34 UTC 2024 - 22.7K bytes - Viewed (0) -
pkg/util/filesystem/defaultfs.go
func (fs *DefaultFs) ReadDir(dirname string) ([]os.DirEntry, error) { return os.ReadDir(fs.prefix(dirname)) } // Walk via filepath.Walk func (fs *DefaultFs) Walk(root string, walkFn filepath.WalkFunc) error { return filepath.Walk(fs.prefix(root), walkFn) } // defaultFile implements File using same-named functions from "os" type defaultFile struct { file *os.File } // Name via os.File.Name
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue Oct 03 07:38:14 UTC 2023 - 4.7K bytes - Viewed (0) -
pkg/util/iptree/iptree.go
count++ return false }) return count } // WalkFn is used when walking the tree. Takes a // key and value, returning if iteration should // be terminated. type WalkFn[T any] func(s netip.Prefix, v T) bool // DepthFirstWalk is used to walk the tree of the corresponding IP family func (t *Tree[T]) DepthFirstWalk(isIPv6 bool, fn WalkFn[T]) { if isIPv6 { recursiveWalk(t.rootV6, fn) }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue Oct 31 21:05:04 UTC 2023 - 17.7K bytes - Viewed (0) -
pkg/util/filesystem/filesystem.go
// from "os" ReadFile(filename string) ([]byte, error) TempDir(dir, prefix string) (string, error) TempFile(dir, prefix string) (File, error) ReadDir(dirname string) ([]os.DirEntry, error) Walk(root string, walkFn filepath.WalkFunc) error } // File is an interface that we can use to mock various filesystem operations typically // accessed through the File object from the "os" package type File interface {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Thu Apr 13 01:02:46 UTC 2023 - 1.6K bytes - Viewed (0) -
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)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 24 16:41:13 UTC 2024 - 19.2K bytes - Viewed (0) -
src/path/filepath/path_test.go
walker := func(path string) error { if strings.HasSuffix(path, "foo2") { sawFoo2 = true } if strings.HasSuffix(path, "foo1") { return filepath.SkipDir } return nil } walkFn := func(path string, _ fs.FileInfo, _ error) error { return walker(path) } walkDirFn := func(path string, _ fs.DirEntry, _ error) error { return walker(path) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Mar 22 16:38:19 UTC 2024 - 47.1K bytes - Viewed (0) -
src/cmd/go/internal/fsys/fsys_test.go
var got []string err := Walk(tc.dir, func(path string, info fs.FileInfo, err error) error { t.Logf("walk %q", path) got = append(got, path) if err != nil { t.Errorf("walkfn: got non nil err argument: %v, want nil err argument", err) } return nil }) if err != nil { t.Errorf("Walk: got error %q, want nil", err) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Sep 20 18:52:11 UTC 2023 - 29.1K bytes - Viewed (0) -
docs/de/docs/python-types.md
=== "Python 3.10+" ```Python hl_lines="1" {!> ../../../docs_src/python_types/tutorial008b_py310.py!} ``` === "Python 3.8+" ```Python hl_lines="1 4"
Registered: Mon Jun 17 08:32:26 UTC 2024 - Last Modified: Sat Mar 30 20:29:25 UTC 2024 - 19.3K bytes - Viewed (0) -
okhttp/src/test/resources/okhttp3/internal/publicsuffix/public_suffix_list.dat
// Submitted by Shante Adam <******@****.***> bounty-full.com alpha.bounty-full.com beta.bounty-full.com // Small Technology Foundation : https://small-tech.org // Submitted by Aral Balkan <******@****.***> small-web.org // Smoove.io : https://www.smoove.io/ // Submitted by Dan Kozak <******@****.***> vp4.me // Snowflake Inc : https://www.snowflake.com/
Registered: Sun Jun 16 04:42:17 UTC 2024 - Last Modified: Wed Dec 20 23:27:07 UTC 2023 - 240.3K bytes - Viewed (0)