- Sort Score
- Result 10 results
- Languages All
Results 51 - 60 of 61 for DirEntry (0.32 sec)
-
src/archive/tar/writer.go
// adding each file to the tar archive while maintaining the directory structure. func (tw *Writer) AddFS(fsys fs.FS) error { return fs.WalkDir(fsys, ".", func(name string, d fs.DirEntry, err error) error { if err != nil { return err } if d.IsDir() { return nil } info, err := d.Info() if err != nil { return err }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:00:11 UTC 2024 - 19.6K bytes - Viewed (0) -
cmd/kubeadm/app/util/users/users_linux.go
// It is equivalent to calling `chown -R uid:gid /path/to/dir`. func UpdatePathOwner(dirPath string, uid, gid int64) error { err := filepath.WalkDir(dirPath, func(path string, d os.DirEntry, err error) error { if err := os.Chown(path, int(uid), int(gid)); err != nil { return errors.Wrapf(err, "failed to update owner of %q to uid: %d and gid: %d", path, uid, gid) } return nil }) return err
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Oct 25 16:35:10 UTC 2023 - 20.7K bytes - Viewed (0) -
src/cmd/go/go_test.go
} if !*testWork { // There shouldn't be anything left in topTmpdir. var extraFiles, extraDirs []string err := filepath.WalkDir(topTmpdir, func(path string, d fs.DirEntry, err error) error { if err != nil { return err } if path == topTmpdir { return nil } if rel, err := filepath.Rel(topTmpdir, path); err == nil { path = rel }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:00:11 UTC 2024 - 81.1K bytes - Viewed (0) -
src/cmd/go/internal/script/cmds.go
// needed in order to remove their contents. func removeAll(dir string) error { // module cache has 0444 directories; // make them writable in order to remove content. filepath.WalkDir(dir, func(path string, info fs.DirEntry, err error) error { // chmod not only directories, but also things that we couldn't even stat // due to permission errors: they may also be unreadable directories. if err != nil || info.IsDir() {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Mar 26 19:58:28 UTC 2024 - 28.5K bytes - Viewed (0) -
src/cmd/internal/testdir/testdir_test.go
} func (t test) goDirName() string { return filepath.Join(t.dir, strings.Replace(t.goFile, ".go", ".dir", -1)) } // goDirFiles returns .go files in dir. func goDirFiles(dir string) (filter []fs.DirEntry, _ error) { files, err := os.ReadDir(dir) if err != nil { return nil, err } for _, goFile := range files { if filepath.Ext(goFile.Name()) == ".go" { filter = append(filter, goFile) } }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Mar 21 20:08:06 UTC 2024 - 57.5K bytes - Viewed (0) -
src/os/file.go
} return b, nil } // ReadDir reads the named directory, returning all its directory entries sorted // by filename. Through this method, dirFS implements [io/fs.ReadDirFS]. func (dir dirFS) ReadDir(name string) ([]DirEntry, error) { fullname, err := dir.join(name) if err != nil { return nil, &PathError{Op: "readdir", Path: name, Err: err} } entries, err := ReadDir(fullname) if err != nil {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Apr 26 23:07:37 UTC 2024 - 25.4K bytes - Viewed (0) -
staging/src/k8s.io/apiextensions-apiserver/test/integration/ratcheting_test.go
// they are all added to the returned slice. func loadObjects(dir string) []*unstructured.Unstructured { result := []*unstructured.Unstructured{} err := filepath.WalkDir(dir, func(path string, d fs.DirEntry, err error) error { if err != nil { return err } else if d.IsDir() { return nil } else if filepath.Ext(d.Name()) != ".yaml" { return nil } // Read the file in as []byte
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue May 28 08:48:22 UTC 2024 - 59.5K bytes - Viewed (0) -
cmd/kubelet/app/server.go
return fmt.Errorf("failed to marshal base config: %w", err) } // Walk through the drop-in directory and update the configuration for each file if err := filepath.WalkDir(kubeletDropInConfigDir, func(path string, info fs.DirEntry, err error) error { if err != nil { return err } if !info.IsDir() && filepath.Ext(info.Name()) == dropinFileExtension { dropinConfigJSON, err := loadDropinConfigFileIntoJSON(path) if err != nil {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Fri Jun 07 00:05:34 UTC 2024 - 53.9K bytes - Viewed (0) -
src/cmd/dist/build.go
} writefile(bdst.String(), dst, 0) } func clean() { generated := []byte(generatedHeader) // Remove generated source files. filepath.WalkDir(pathf("%s/src", goroot), func(path string, d fs.DirEntry, err error) error { switch { case err != nil: // ignore case d.IsDir() && (d.Name() == "vendor" || d.Name() == "testdata"): return filepath.SkipDir case d.IsDir() && d.Name() != "dist":
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon May 20 18:34:40 UTC 2024 - 54K bytes - Viewed (0) -
src/cmd/dist/test.go
var dirs []pathMode // in lexical order undo = func() { for i := range dirs { os.Chmod(dirs[i].path, dirs[i].mode) // best effort } } filepath.WalkDir(dir, func(path string, d fs.DirEntry, err error) error { if suffix := strings.TrimPrefix(path, dir+string(filepath.Separator)); suffix != "" { if suffix == ".git" { // Leave Git metadata in whatever state it was in. It may contain a lot
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon May 20 16:01:35 UTC 2024 - 50K bytes - Viewed (0)