- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 61 for DirEntry (0.14 sec)
-
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/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_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/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) -
subprojects/core/src/integTest/groovy/org/gradle/normalization/ConfigureRuntimeClasspathNormalizationIntegrationTest.groovy
def "can ignore properties in selected files"() { def project = new ProjectWithRuntimeClasspathNormalization(Api.RUNTIME) def notIgnoredPropertiesFile = new PropertiesResource(project.root.file('classpath/dirEntry/bar.properties'), [(IGNORE_ME_TOO): 'this should not actually be ignored']) project.buildFile << """ normalization { runtimeClasspath {
Registered: Wed Jun 12 18:38:38 UTC 2024 - Last Modified: Fri Sep 01 03:07:53 UTC 2023 - 37.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) -
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)