- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 41 for walkDir (0.15 sec)
-
src/io/fs/walk.go
// // The error result returned by the function controls how [WalkDir] // continues. If the function returns the special value [SkipDir], WalkDir // skips the current directory (path if d.IsDir() is true, otherwise // path's parent directory). If the function returns the special value // [SkipAll], WalkDir skips all remaining files and directories. Otherwise, // if the function returns a non-nil error, WalkDir stops entirely and // returns that error. //
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Jan 09 08:50:19 UTC 2024 - 4.7K bytes - Viewed (0) -
cmd/metacache-walk.go
DiskID string } // supported FS for Nlink optimization in readdir. const ( xfs = "XFS" ext4 = "EXT4" ) // WalkDir will traverse a directory and return all entries found. // On success a sorted meta cache stream will be returned. // Metadata has data stripped, if any. func (s *xlStorage) WalkDir(ctx context.Context, opts WalkDirOptions, wr io.Writer) (err error) { legacyFS := !(s.fsType == xfs || s.fsType == ext4) s.RLock()
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Sat Jun 01 05:17:37 UTC 2024 - 12.4K bytes - Viewed (0) -
src/path/filepath/path.go
// // WalkDir does not follow symbolic links. // // WalkDir calls fn with paths that use the separator character appropriate // for the operating system. This is unlike [io/fs.WalkDir], which always // uses slash separated paths. func WalkDir(root string, fn fs.WalkDirFunc) error { info, err := os.Lstat(root) if err != nil { err = fn(root, nil, err) } else {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:00:11 UTC 2024 - 15.5K bytes - Viewed (0) -
platforms/core-configuration/file-collections/src/main/java/org/gradle/api/internal/file/collections/DirectoryFileTree.java
Registered: Wed Jun 12 18:38:38 UTC 2024 - Last Modified: Thu Feb 15 21:33:45 UTC 2024 - 6.6K bytes - Viewed (0) -
src/cmd/fix/main.go
return "<" + err.Error() + ">" } return gofmtBuf.String() } func report(err error) { scanner.PrintError(os.Stderr, err) exitCode = 2 } func walkDir(path string) { filepath.WalkDir(path, visitFile) } func visitFile(path string, f fs.DirEntry, err error) error { if err == nil && isGoFile(f) { err = processFile(path, false) } if err != nil { report(err)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue May 14 19:41:17 UTC 2024 - 5.4K bytes - Viewed (0) -
cmd/storage-interface.go
StatVol(ctx context.Context, volume string) (vol VolInfo, err error) DeleteVol(ctx context.Context, volume string, forceDelete bool) (err error) // WalkDir will walk a directory on disk and return a metacache stream on wr. WalkDir(ctx context.Context, opts WalkDirOptions, wr io.Writer) error // Metadata operations
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Mon Jun 10 15:51:27 UTC 2024 - 5K bytes - Viewed (0) -
src/testing/fstest/mapfs_test.go
t.Fatal(err) } } func TestMapFSChmodDot(t *testing.T) { m := MapFS{ "a/b.txt": &MapFile{Mode: 0666}, ".": &MapFile{Mode: 0777 | fs.ModeDir}, } buf := new(strings.Builder) fs.WalkDir(m, ".", func(path string, d fs.DirEntry, err error) error { fi, err := d.Info() if err != nil { return err } fmt.Fprintf(buf, "%s: %v\n", path, fi.Mode()) return nil }) want := ` .: drwxrwxrwx
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Feb 20 14:59:55 UTC 2024 - 1.3K bytes - Viewed (0) -
lib/time/mkzip.go
flag.Parse() args := flag.Args() if len(args) != 1 || !strings.HasSuffix(args[0], ".zip") { usage() } var zb bytes.Buffer zw := zip.NewWriter(&zb) seen := make(map[string]bool) err := filepath.WalkDir(".", func(path string, d fs.DirEntry, err error) error { if d.IsDir() { return nil } data, err := os.ReadFile(path) if err != nil { log.Fatal(err) } if strings.HasSuffix(path, ".zip") {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Mar 04 17:32:07 UTC 2024 - 2.1K bytes - Viewed (0) -
src/path/filepath/path_test.go
check(t, Walk, td) check(t, Walk, filepath.Join(td, "dir")) }) t.Run("WalkDir", func(t *testing.T) { WalkDir := func(root string) error { return filepath.WalkDir(td, walkDirFn) } check(t, WalkDir, td) check(t, WalkDir, filepath.Join(td, "dir")) }) } func TestWalkSkipAllOnFile(t *testing.T) { td := t.TempDir()
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/compress/gzip/issue14937_test.go
t.Skip("skipping; no GOROOT available") } goroot, err := filepath.EvalSymlinks(runtime.GOROOT()) if err != nil { t.Fatal("error evaluating GOROOT: ", err) } var files []string err = filepath.WalkDir(goroot, func(path string, info fs.DirEntry, err error) error { if err != nil { return err } if !info.IsDir() && strings.HasSuffix(path, ".gz") { files = append(files, path) } return nil })
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Apr 10 16:37:53 UTC 2024 - 2K bytes - Viewed (0)