- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 11 for DirEntry (0.74 sec)
-
src/embed/embed.go
) // A file is a single file in the FS. // It implements fs.FileInfo and fs.DirEntry. type file struct { // The compiler knows the layout of this struct. // See cmd/compile/internal/staticdata's WriteEmbed. name string data string hash [16]byte // truncated SHA256 hash } var ( _ fs.FileInfo = (*file)(nil) _ fs.DirEntry = (*file)(nil) )
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon May 20 19:42:51 UTC 2024 - 13.5K bytes - Viewed (0) -
src/testing/fstest/testfs.go
// The order of the lists need not match. func (t *fsTester) checkDirList(dir, desc string, list1, list2 []fs.DirEntry) { old := make(map[string]fs.DirEntry) checkMode := func(entry fs.DirEntry) { if entry.IsDir() != (entry.Type()&fs.ModeDir != 0) { if entry.IsDir() { t.errorf("%s: ReadDir returned %s with IsDir() = true, Type() & ModeDir = 0", dir, entry.Name())
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:00:11 UTC 2024 - 16.3K bytes - Viewed (0) -
src/cmd/gofmt/gofmt.go
// It's only -r that makes use of go/ast's object resolution, // so avoid the unnecessary work if the flag isn't used. if *rewriteRule == "" { parserMode |= parser.SkipObjectResolution } } func isGoFile(f fs.DirEntry) bool { // ignore non-Go files name := f.Name() return !strings.HasPrefix(name, ".") && strings.HasSuffix(name, ".go") && !f.IsDir() } // A sequencer performs concurrent tasks that may write output, but emits that
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue May 14 19:41:17 UTC 2024 - 15.1K bytes - Viewed (0) -
cni/test/install_cni.go
} func ls(dir string, t *testing.T) []string { files, err := os.ReadDir(dir) t.Helper() if err != nil { t.Fatalf("Failed to list files, err: %v", err) } return slices.Map(files, func(e os.DirEntry) string { return e.Name() }) } func cp(src, dest string, t *testing.T) { t.Helper() data, err := os.ReadFile(src) if err != nil { t.Fatalf("Failed to read file %v, err: %v", src, err) }
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Tue May 21 18:32:01 UTC 2024 - 11.4K bytes - Viewed (0) -
src/cmd/vendor/golang.org/x/build/relnote/relnote.go
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 }) if err != 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) -
src/cmd/go/internal/modfetch/fetch.go
func makeDirsReadOnly(dir string) { type pathMode struct { path string mode fs.FileMode } var dirs []pathMode // in lexical order filepath.WalkDir(dir, func(path string, d fs.DirEntry, err error) error { if err == nil && d.IsDir() { info, err := d.Info() if err == nil && info.Mode()&0222 != 0 { dirs = append(dirs, pathMode{path, info.Mode()}) } } return nil })
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 30 14:56:56 UTC 2024 - 30.3K bytes - Viewed (0) -
src/index/suffixarray/suffixarray_test.go
var err error data, err = os.ReadFile("../../testdata/Isaac.Newton-Opticks.txt") if err != nil { return nil, err } case "go": err := filepath.WalkDir("../..", func(path string, info fs.DirEntry, err error) error { if err == nil && strings.HasSuffix(path, ".go") && !info.IsDir() { file, err := os.ReadFile(path) if err != nil { return err } data = append(data, file...) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:00:11 UTC 2024 - 14.1K bytes - Viewed (0) -
src/os/file_unix.go
return d.info, nil } return lstat(d.parent + "/" + d.name) } func (d *unixDirent) String() string { return fs.FormatDirEntry(d) } func newUnixDirent(parent, name string, typ FileMode) (DirEntry, error) { ude := &unixDirent{ parent: parent, name: name, typ: typ, } if typ != ^FileMode(0) && !testingForceReadDirLstat { return ude, nil }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 29 13:52:34 UTC 2024 - 14.9K bytes - Viewed (0) -
src/path/filepath/path.go
// Readdirnames. type WalkFunc func(path string, info fs.FileInfo, err error) error var lstat = os.Lstat // for testing // walkDir recursively descends path, calling walkDirFn. func walkDir(path string, d fs.DirEntry, walkDirFn fs.WalkDirFunc) error { if err := walkDirFn(path, d, nil); err != nil || !d.IsDir() { if err == SkipDir && d.IsDir() { // Successfully skipped directory. err = nil } return err }
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/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) if strings.HasPrefix(base, ".") || strings.HasPrefix(base, "_") || base == "testdata" {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 24 16:41:13 UTC 2024 - 19.2K bytes - Viewed (0)