- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 45 for DirEntry (0.32 sec)
-
src/io/fs/format.go
} return string(b) } // FormatDirEntry returns a formatted version of dir for human readability. // Implementations of [DirEntry] can call this from a String method. // The outputs for a directory named subdir and a file named hello.go are: // // d subdir/ // - hello.go func FormatDirEntry(dir DirEntry) string { name := dir.Name() b := make([]byte, 0, 5+len(name)) // The Type method does not return any permission bits,
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Oct 18 19:34:35 UTC 2023 - 1.7K bytes - Viewed (0) -
pkg/kubelet/container/testing/mockdirentry.go
limitations under the License. */ // Code generated by MockGen. // Source: os (interfaces: DirEntry) package testing import ( fs "io/fs" reflect "reflect" gomock "go.uber.org/mock/gomock" ) // MockDirEntry is a mock of DirEntry interface. type MockDirEntry struct { ctrl *gomock.Controller recorder *MockDirEntryMockRecorder }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Thu Mar 07 08:12:16 UTC 2024 - 3K bytes - Viewed (0) -
src/testing/fstest/mapfs.go
return 0, &fs.PathError{Op: "read", Path: d.path, Err: fs.ErrInvalid} } func (d *mapDir) ReadDir(count int) ([]fs.DirEntry, error) { n := len(d.entry) - d.offset if n == 0 && count > 0 { return nil, io.EOF } if count > 0 && n > count { n = count } list := make([]fs.DirEntry, n) for i := range list { list[i] = &d.entry[d.offset+i] } d.offset += n return list, nil
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:00:11 UTC 2024 - 7.1K bytes - Viewed (0) -
src/io/fs/example_test.go
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 21 03:21:56 UTC 2021 - 462 bytes - Viewed (0) -
src/testing/fstest/testfs_test.go
f, err := MapFS(fsys).Open(name) if err != nil { return nil, err } return &shuffledFile{File: f}, nil } type shuffledFile struct{ fs.File } func (f *shuffledFile) ReadDir(n int) ([]fs.DirEntry, error) { dirents, err := f.File.(fs.ReadDirFile).ReadDir(n) // Shuffle in a deterministic way, all we care about is making sure that the // list of directory entries is not is the lexicographic order. //
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:00:11 UTC 2024 - 2.9K bytes - Viewed (0) -
src/cmd/go/internal/toolchain/path_none.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) { return "", false
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 31 15:15:19 UTC 2023 - 620 bytes - Viewed (0) -
src/cmd/go/internal/toolchain/path_plan9.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 == "" || info.Mode()&0111 == 0 { return "", false } return v, true
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 31 15:15:19 UTC 2023 - 764 bytes - Viewed (0) -
pkg/kubelet/container/testing/os.go
// If a member of the form `*Fn` is set, that function will be called in place // of the real call. type FakeOS struct { StatFn func(string) (os.FileInfo, error) ReadDirFn func(string) ([]os.DirEntry, error) MkdirAllFn func(string, os.FileMode) error SymlinkFn func(string, string) error GlobFn func(string, string) bool HostName string Removes []string Files map[string][]*os.FileInfo
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue Feb 07 13:37:31 UTC 2023 - 3.7K bytes - Viewed (0) -
pkg/kubelet/container/os.go
Chmod(path string, perm os.FileMode) error Hostname() (name string, err error) Chtimes(path string, atime time.Time, mtime time.Time) error Pipe() (r *os.File, w *os.File, err error) ReadDir(dirname string) ([]os.DirEntry, error) Glob(pattern string) ([]string, error) Open(name string) (*os.File, error) OpenFile(name string, flag int, perm os.FileMode) (*os.File, error) Rename(oldpath, newpath string) error }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Sat Jul 30 03:35:26 UTC 2022 - 3.7K bytes - Viewed (0) -
tools/docker-builder/builder/tar.go
} defer data.Close() if _, err := io.Copy(tw, data); err != nil { return err } } return nil } if isDir { if err := filepath.WalkDir(src, func(path string, d fs.DirEntry, err error) error { if err != nil { return err } return write(path) }); err != nil { return err } } else { if err := write(src); err != nil { return err
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Fri Apr 29 17:01:46 UTC 2022 - 3.7K bytes - Viewed (0)