- Sort Score
- Result 10 results
- Languages All
Results 21 - 30 of 45 for DirEntry (1.43 sec)
-
src/cmd/go/internal/toolchain/path_unix.go
} // pathVersion returns the Go version implemented by the file // described by de and info in directory dir. // The analysis only uses the name itself; it does not run the program. func pathVersion(dir string, de fs.DirEntry, info fs.FileInfo) (string, bool) { v := gover.FromToolchain(de.Name()) if v == "" { return "", false } // Mimicking exec.findExecutable here. // ENOSYS means Eaccess is not available or not implemented.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 31 15:15:19 UTC 2023 - 1.2K bytes - Viewed (0) -
src/testing/fstest/mapfs_test.go
} 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 a: dr-xr-xr-x
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Feb 20 14:59:55 UTC 2024 - 1.3K bytes - Viewed (0) -
src/cmd/go/testdata/savedir.go
usage() } log.SetPrefix("savedir: ") log.SetFlags(0) dir := flag.Arg(0) a := new(txtar.Archive) dir = filepath.Clean(dir) filepath.WalkDir(dir, func(path string, info fs.DirEntry, err error) error { if path == dir { return nil } name := info.Name() if strings.HasPrefix(name, ".") { if info.IsDir() { return filepath.SkipDir } return nil }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Aug 30 19:41:54 UTC 2023 - 1.5K bytes - Viewed (0) -
src/cmd/fix/main.go
} 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) } return nil } func isGoFile(f fs.DirEntry) bool { // ignore non-Go files name := f.Name()
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue May 14 19:41:17 UTC 2024 - 5.4K bytes - Viewed (0) -
src/io/fs/format_test.go
// license that can be found in the LICENSE file. package fs_test import ( . "io/fs" "testing" "time" ) // formatTest implements FileInfo to test FormatFileInfo, // and implements DirEntry to test FormatDirEntry. type formatTest struct { name string size int64 mode FileMode modTime time.Time isDir bool } func (fs *formatTest) Name() string { return fs.name }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue May 02 17:59:28 UTC 2023 - 2.5K bytes - Viewed (0) -
pkg/util/filesystem/filesystem.go
Remove(name string) error // from "os" ReadFile(filename string) ([]byte, error) TempDir(dir, prefix string) (string, error) TempFile(dir, prefix string) (File, error) ReadDir(dirname string) ([]os.DirEntry, error) Walk(root string, walkFn filepath.WalkFunc) error } // File is an interface that we can use to mock various filesystem operations typically // accessed through the File object from the "os" package
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Thu Apr 13 01:02:46 UTC 2023 - 1.6K bytes - Viewed (0) -
lib/time/mkzip.go
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) -
test/winbatch.go
// skipping directories that start with "." and named "testdata", // and ensure all .bat files found have exact CRLF line endings. err := filepath.WalkDir(runtime.GOROOT(), func(path string, d os.DirEntry, err error) error { if err != nil { return err } if d.IsDir() && (strings.HasPrefix(d.Name(), ".") || d.Name() == "testdata") { return filepath.SkipDir }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Dec 02 16:33:57 UTC 2020 - 2K bytes - Viewed (0) -
src/cmd/internal/bootstrap_test/overlaydir_test.go
if err := os.MkdirAll(dstRoot, 0777); err != nil { return err } srcRoot, err := filepath.Abs(srcRoot) if err != nil { return err } return filepath.WalkDir(srcRoot, func(srcPath string, entry fs.DirEntry, err error) error { if err != nil || srcPath == srcRoot { return err } if filepath.Base(srcPath) == "testdata" { // We're just building, so no need to copy those. return fs.SkipDir }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 12 12:35:05 UTC 2023 - 2.1K bytes - Viewed (0) -
src/cmd/go/internal/toolchain/path_windows.go
} // pathVersion returns the Go version implemented by the file // described by de and info in directory dir. // The analysis only uses the name itself; it does not run the program. func pathVersion(dir string, de fs.DirEntry, info fs.FileInfo) (string, bool) { pathExts.once.Do(initPathExts) name, _, ok := cutExt(de.Name(), pathExts.list) if !ok { return "", false } v := gover.FromToolchain(name) if v == "" {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 31 15:15:19 UTC 2023 - 1.8K bytes - Viewed (0)