- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 29 for walkDir (0.15 sec)
-
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) -
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/cmd/gofmt/gofmt.go
} in = f defer func() { f.Close() <-fdSem }() } // Compute the file's size and read its contents with minimal allocations. // // If we have the FileInfo from filepath.WalkDir, use it to make // a buffer of the right size and avoid ReadAll's reallocations. // // If the size is unknown (or bogus, or overflows an int), fall back to // a size-independent ReadAll. size := -1
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue May 14 19:41:17 UTC 2024 - 15.1K bytes - Viewed (0) -
pkg/volume/util/subpath/subpath_linux.go
// After go 1.16, WalkDir was introduced, it's more effective than Walk because the callback WalkDirFunc is called before // reading a directory, making it save some time when a container's subPath contains lots of dirs. // See https://github.com/kubernetes/kubernetes/pull/71804 and https://github.com/kubernetes/kubernetes/issues/107667 for more details.
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue Jul 12 14:09:11 UTC 2022 - 21.4K bytes - Viewed (0) -
src/cmd/go/internal/toolchain/select.go
base.Fatalf("download %s: %v", gotoolchain, err) } if info.Mode()&0111 == 0 { // allowExec sets the exec permission bits on all files found in dir. allowExec := func(dir string) { err := filepath.WalkDir(dir, func(path string, d fs.DirEntry, err error) error { if err != nil { return err } if !d.IsDir() { info, err := os.Stat(path) if err != nil { return err }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue May 07 17:25:05 UTC 2024 - 23.4K bytes - Viewed (0) -
src/cmd/go/internal/vcweb/vcweb.go
fmt.Fprintf(w, "For an overview of the script language, see <a href=\"/help\">/help</a>.\n\n") fmt.Fprintf(w, "<b>cache</b>\n") tw := tabwriter.NewWriter(w, 1, 8, 1, '\t', 0) err := filepath.WalkDir(s.scriptDir, func(path string, d fs.DirEntry, err error) error { if err != nil { return err } if filepath.Ext(path) != ".txt" { return nil } rel, err := filepath.Rel(s.scriptDir, path)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Jun 14 00:03:57 UTC 2023 - 12.1K bytes - Viewed (0) -
cmd/metacache-set.go
readers[i] = newMetacacheReader(r) d := disks[i] // Send request to each disk. go func() { var werr error if d == nil { werr = errDiskNotFound } else { werr = d.WalkDir(ctx, WalkDirOptions{ Limit: opts.perDiskLimit, Bucket: opts.bucket, BaseDir: opts.path, Recursive: opts.recursive, ReportNotFound: opts.reportNotFound,
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Fri Jun 07 22:18:44 UTC 2024 - 30.4K bytes - Viewed (0) -
src/cmd/vendor/golang.org/x/build/relnote/relnote.go
res = append(res, b) } // Remove empty headings at the end of the document. rem(1) return res } func sortedMarkdownFilenames(fsys fs.FS) ([]string, error) { var filenames []string err := fs.WalkDir(fsys, ".", func(path string, d fs.DirEntry, err error) error { if err != nil { return err } if !d.IsDir() && strings.HasSuffix(path, ".md") { filenames = append(filenames, path) } return nil
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Jun 04 16:19:04 UTC 2024 - 12.7K bytes - Viewed (0) -
misc/go_android_exec/main.go
// contains nested modules this could push a lot of unnecessary contents, // but for the golang.org/x repos it seems to be significantly (~2x) // faster than copying one file at a time (via filepath.WalkDir), // apparently due to high latency in 'adb' commands. if err := adb("push", modDir, deviceModDir); err != nil { return 0, err } } else {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Aug 21 17:46:57 UTC 2023 - 15.3K bytes - Viewed (0)