- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 489 for walkFn (0.13 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
if err := walk(filename, fi, walkFn); err != nil { if !fi.IsDir() || err != filepath.SkipDir { return err } } } return nil } // Walk walks the file tree rooted at root, calling walkFn for each file or // directory in the tree, including root. func Walk(root string, walkFn filepath.WalkFunc) error { Trace("Walk", root) info, err := Lstat(root) if err != nil {
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
// ReadDir via os.ReadDir 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 }
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) -
src/path/filepath/path_test.go
t.Helper() sawFoo2 = false err := walk(root) if err != nil { t.Fatal(err) } if sawFoo2 { t.Errorf("SkipDir on file foo1 did not block processing of foo2") } } t.Run("Walk", func(t *testing.T) { Walk := func(root string) error { return filepath.Walk(td, walkFn) } check(t, Walk, td) check(t, Walk, filepath.Join(td, "dir")) })
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/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/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) -
src/io/fs/walk.go
break } return err } } return nil } // WalkDir walks the file tree rooted at root, calling fn for each file or // directory in the tree, including root. // // All errors that arise visiting files and directories are filtered by fn: // see the [fs.WalkDirFunc] documentation for details. // // The files are walked in lexical order, which makes the output deterministic
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/cmd/compile/internal/walk/walk.go
const tmpstringbufsize = 32 func Walk(fn *ir.Func) { ir.CurFunc = fn errorsBefore := base.Errors() order(fn) if base.Errors() > errorsBefore { return } if base.Flag.W != 0 { s := fmt.Sprintf("\nbefore walk %v", ir.CurFunc.Sym()) ir.DumpList(s, ir.CurFunc.Body) } walkStmtList(ir.CurFunc.Body) if base.Flag.W != 0 { s := fmt.Sprintf("after walk %v", ir.CurFunc.Sym())
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Feb 27 20:56:00 UTC 2024 - 10.4K bytes - Viewed (0) -
platforms/core-configuration/model-core/src/main/java/org/gradle/internal/properties/annotations/TypeMetadataWalker.java
return new AbstractTypeMetadataWalker.InstanceTypeMetadataWalker(typeMetadataStore, nestedAnnotation); } /** * A factory method for a walker that can visit property hierarchy declared by a type. * * Type walker can detect a nested property cycle and stop walking the path with a cycle, no exception is thrown. */
Registered: Wed Jun 12 18:38:38 UTC 2024 - Last Modified: Thu Sep 28 09:51:04 UTC 2023 - 3.9K bytes - Viewed (0)