- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 279 for readdir (0.2 sec)
-
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/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) -
src/os/dir_darwin.go
} return ^FileMode(0) } // Implemented in syscall/syscall_darwin.go. //go:linkname closedir syscall.closedir func closedir(dir uintptr) (err error) //go:linkname readdir_r syscall.readdir_r
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Apr 15 20:52:06 UTC 2024 - 3.5K 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/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) -
cmd/os-readdir_test.go
// Check non existent directory. if _, err := readDir("/tmp/non-existent-directory"); err != errFileNotFound { t.Fatalf("expected = %s, got: %s", errFileNotFound, err) } file := path.Join(os.TempDir(), "issue") if err := os.WriteFile(file, []byte(""), 0o644); err != nil { t.Fatal(err) } defer os.RemoveAll(file) // Check if file is given. if _, err := readDir(path.Join(file, "mydir")); err != errFileNotFound {
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Mon Sep 19 18:05:16 UTC 2022 - 7.5K 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) -
pkg/volume/util/io_util.go
return &osIOHandler{} } func (handler *osIOHandler) ReadFile(filename string) ([]byte, error) { return os.ReadFile(filename) } func (handler *osIOHandler) ReadDir(dirname string) ([]os.FileInfo, error) { return ioutil.ReadDir(dirname) } func (handler *osIOHandler) Lstat(name string) (os.FileInfo, error) { return os.Lstat(name) } func (handler *osIOHandler) EvalSymlinks(path string) (string, error) {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue Jun 20 14:49:03 UTC 2023 - 1.4K bytes - Viewed (0) -
src/internal/poll/fd_wasip1.go
return syscall.Chdir(fd.Path) } // ReadDir wraps syscall.ReadDir. // We treat this like an ordinary system call rather than a call // that tries to fill the buffer. func (fd *FD) ReadDir(buf []byte, cookie syscall.Dircookie) (int, error) { if err := fd.incref(); err != nil { return 0, err } defer fd.decref() for { n, err := syscall.ReadDir(fd.Sysfd, buf, cookie) if err != nil { n = 0
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue May 14 20:14:02 UTC 2024 - 6.7K bytes - Viewed (0) -
pkg/volume/util/device_util_linux.go
io := handler.getIo disk, err := findDeviceForPath(device, io) if err != nil { return "" } sysPath := "/sys/block/" if dirs, err := io.ReadDir(sysPath); err == nil { for _, f := range dirs { name := f.Name() if strings.HasPrefix(name, "dm-") { if _, err1 := io.Lstat(sysPath + name + "/slaves/" + disk); err1 == nil { return "/dev/" + name }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Fri Sep 16 11:12:06 UTC 2022 - 9.4K bytes - Viewed (0)