- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 184 for xreaddir (0.23 sec)
-
src/testing/fstest/testfs.go
t.errorf("%s: third Open: ReadDir(%d) after %d: 0 entries but nil error", dir, n, len(list2)) return } } t.checkDirList(dir, "first Open+ReadDir(-1) vs third Open+ReadDir(1,2) loop", list, list2) // If fsys has ReadDir, check that it matches and is sorted. if fsys, ok := t.fsys.(fs.ReadDirFS); ok { list2, err := fsys.ReadDir(dir) if err != nil { t.errorf("%s: fsys.ReadDir: %w", dir, err) return }
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/io/fs/readdir_test.go
names = append(names, d.Name()) } t.Errorf("ReadDir(%s) = %v, %v, want %v, nil", desc, names, err, []string{"hello.txt", "sub"}) } } // Test that ReadDir uses the method when present. dirs, err := ReadDir(readDirOnly{testFsys}, ".") check("readDirOnly", dirs, err) // Test that ReadDir uses Open when the method is not present. dirs, err = ReadDir(openOnly{testFsys}, ".") check("openOnly", dirs, err)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Nov 27 16:25:41 UTC 2023 - 2.6K bytes - Viewed (0) -
src/io/ioutil/ioutil_test.go
} } func TestReadDir(t *testing.T) { dirname := "rumpelstilzchen" _, err := ReadDir(dirname) if err == nil { t.Fatalf("ReadDir %s: error expected, none found", dirname) } dirname = ".." list, err := ReadDir(dirname) if err != nil { t.Fatalf("ReadDir %s: %v", dirname, err) } foundFile := false foundSubDir := false for _, dir := range list { switch {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Apr 11 20:56:32 UTC 2023 - 3.2K bytes - Viewed (0) -
src/io/fs/fs.go
// // If n > 0, ReadDir returns at most n DirEntry structures. // In this case, if ReadDir returns an empty slice, it will return // a non-nil error explaining why. // At the end of a directory, the error is io.EOF. // (ReadDir must return io.EOF itself, not an error wrapping io.EOF.) // // If n <= 0, ReadDir returns all the DirEntry values from the directory
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Jan 15 21:21:41 UTC 2024 - 9.4K bytes - Viewed (0) -
pkg/kubelet/container/os.go
// Pipe will call os.Pipe to return a connected pair of pipe. func (RealOS) Pipe() (r *os.File, w *os.File, err error) { return os.Pipe() } // ReadDir will call os.ReadDir to return the files under the directory. func (RealOS) ReadDir(dirname string) ([]os.DirEntry, error) { return os.ReadDir(dirname) } // Glob will call filepath.Glob to return the names of all files matching // pattern.
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Sat Jul 30 03:35:26 UTC 2022 - 3.7K bytes - Viewed (0) -
src/io/fs/walk.go
// attempted and has err set to nil, giving the function a chance to // return [SkipDir] or [SkipAll] and avoid the ReadDir entirely. The second call // is after a failed ReadDir and reports the error from ReadDir. // (If ReadDir succeeds, there is no second call.) // // The differences between WalkDirFunc compared to [path/filepath.WalkFunc] are: // // - The second argument has type [DirEntry] instead of [FileInfo].
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Jan 09 08:50:19 UTC 2024 - 4.7K bytes - Viewed (0) -
src/os/read_test.go
} } func TestReadDir(t *testing.T) { t.Parallel() dirname := "rumpelstilzchen" _, err := ReadDir(dirname) if err == nil { t.Fatalf("ReadDir %s: error expected, none found", dirname) } dirname = "." list, err := ReadDir(dirname) if err != nil { t.Fatalf("ReadDir %s: %v", dirname, err) } foundFile := false foundSubDir := false for _, dir := range list { switch {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 10 02:36:46 UTC 2024 - 3.2K bytes - Viewed (0) -
pkg/test/util/yml/cache_test.go
keys = c.AllKeys() g.Expect(keys).To(HaveLen(2)) g.Expect(keys).To(ContainElement(key1)) g.Expect(keys).To(ContainElement(key2)) items, err := os.ReadDir(d) g.Expect(err).To(BeNil()) g.Expect(items).To(HaveLen(2)) } func TestCache_Apply_MultiPart(t *testing.T) { g := NewWithT(t) d := t.TempDir() t.Logf("Test Dir: %q", d) c := NewCache(d)
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Tue Oct 31 14:48:28 UTC 2023 - 6.8K bytes - Viewed (0) -
src/io/ioutil/ioutil.go
return os.WriteFile(filename, data, perm) } // ReadDir reads the directory named by dirname and returns // a list of fs.FileInfo for the directory's contents, // sorted by filename. If an error occurs reading the directory, // ReadDir returns no directory entries along with the error. // // Deprecated: As of Go 1.16, [os.ReadDir] is a more efficient and correct choice:
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:00:11 UTC 2024 - 3.2K bytes - Viewed (0) -
pkg/test/util/file/file.go
} return "", fmt.Errorf("file not found %v", filePath) } // ReadDir returns the names of all files in the given directory. This is not recursive. // The base path is appended; for example, ReadDir("dir") -> ["dir/file1", "dir/folder1"] func ReadDir(filePath string, extensions ...string) ([]string, error) { dir, err := os.ReadDir(filePath) if err != nil { return nil, err } res := []string{}
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Wed May 17 02:22:22 UTC 2023 - 4.6K bytes - Viewed (0)