- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 25 for readdirp (0.09 sec)
-
cmd/is-dir-empty_linux.go
func isDirEmpty(dirname string, legacy bool) bool { if legacy { // On filesystems such as btrfs, nfs this is not true, so fallback // to performing readdir() instead. entries, err := readDirN(dirname, 1) if err != nil { return false } return len(entries) == 0 } var stat syscall.Stat_t if err := syscall.Stat(dirname, &stat); err != nil { return false }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri Apr 05 15:17:08 UTC 2024 - 1.4K bytes - Viewed (0) -
cmd/is-dir-empty_other.go
package cmd // isDirEmpty - returns true if there is no error and no object and prefix inside this directory func isDirEmpty(dirname string, _ bool) bool { entries, err := readDirN(dirname, 1) if err != nil { return false } return len(entries) == 0
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri Apr 05 15:17:08 UTC 2024 - 1K bytes - Viewed (0) -
cni/pkg/nodeagent/fakes_test.go
if err != nil { panic(err) } subFs, err = fs.Sub(subFs, "cgroupns") if err != nil { panic(err) } return &fakeFsWithFakeFds{ReadDirFS: subFs.(fs.ReadDirFS)} } type fakeFsWithFakeFds struct { fs.ReadDirFS } type fakeFileFakeFds struct { fs.File fd uintptr } func (f *fakeFileFakeFds) Fd() uintptr { return f.fd }
Registered: Wed Nov 06 22:53:10 UTC 2024 - Last Modified: Fri Jun 28 23:33:46 UTC 2024 - 3.9K bytes - Viewed (0) -
cni/pkg/install/binaries.go
// and returns a set of the filenames copied. func copyBinaries(srcDir string, targetDirs []string) (sets.String, error) { copiedFilenames := sets.String{} srcFiles, err := os.ReadDir(srcDir) if err != nil { return copiedFilenames, err } for _, f := range srcFiles { if f.IsDir() { continue } filename := f.Name() srcFilepath := filepath.Join(srcDir, filename)
Registered: Wed Nov 06 22:53:10 UTC 2024 - Last Modified: Fri Jun 28 19:12:54 UTC 2024 - 1.5K bytes - Viewed (0) -
cmd/storage-errors.go
var errMoreData = StorageErr("more data was sent than what was advertised") // indicates readDirFn to return without further applying the fn() var errDoneForNow = errors.New("done for now") // errSkipFile returned by the fn() for readDirFn() when it needs // to proceed to next entry. var errSkipFile = errors.New("skip this file")
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Thu Apr 04 12:04:40 UTC 2024 - 6.4K bytes - Viewed (0) -
internal/store/queuestore.go
// list will read all entries from disk. // Entries are returned sorted by modtime, oldest first. // Underlying entry list in store is *not* updated. func (store *QueueStore[_]) list() ([]os.DirEntry, error) { files, err := os.ReadDir(store.directory) if err != nil { return nil, err } // Sort the entries. sort.Slice(files, func(i, j int) bool { ii, err := files[i].Info() if err != nil { return false }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri Sep 06 23:06:30 UTC 2024 - 8.6K bytes - Viewed (0) -
cni/test/install_cni.go
t.Fatalf("Couldn't get current working directory, err: %v", err) } t.Logf("Created temporary dir: %v", tempDir) return tempDir } func ls(dir string, t *testing.T) []string { files, err := os.ReadDir(dir) t.Helper() if err != nil { t.Fatalf("Failed to list files, err: %v", err) } return slices.Map(files, func(e os.DirEntry) string { return e.Name() }) }
Registered: Wed Nov 06 22:53:10 UTC 2024 - Last Modified: Thu Aug 01 18:38:14 UTC 2024 - 11.3K bytes - Viewed (0) -
cmd/os_unix.go
if err != nil { return consumed, nil, typ, err } return consumed, nameBuf[:nameLen], typ, nil } // readDirFn applies the fn() function on each entries at dirPath, doesn't recurse into // the directory itself, if the dirPath doesn't exist this function doesn't return // an error. func readDirFn(dirPath string, fn func(name string, typ os.FileMode) error) error { fd, err := openFileWithFD(dirPath, readMode, 0o666)
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Thu Jan 18 07:03:17 UTC 2024 - 9.3K bytes - Viewed (0) -
istioctl/pkg/workload/workload_test.go
// to generate golden outputs from the VM command. func TestWorkloadEntryConfigure(t *testing.T) { noClusterID := "failed to automatically determine the --clusterID" files, err := os.ReadDir("testdata/vmconfig") if err != nil { t.Fatal(err) } testCases := map[string]map[string]string{ "ipv4": { "internalIP": "10.10.10.10", "ingressIP": "10.10.10.11", }, "ipv6": {
Registered: Wed Nov 06 22:53:10 UTC 2024 - Last Modified: Thu Aug 01 20:04:20 UTC 2024 - 14.6K bytes - Viewed (0) -
src/cmd/api/api_test.go
// slow, not worth repeating in -check t.Skip("skipping with -check set") } testenv.MustHaveGoBuild(t) td, err := os.Open("testdata/src/pkg") if err != nil { t.Fatal(err) } fis, err := td.Readdir(0) if err != nil { t.Fatal(err) } for _, fi := range fis { if !fi.IsDir() { continue } // TODO(gri) remove extra pkg directory eventually
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Thu Jan 04 17:31:12 UTC 2024 - 7.1K bytes - Viewed (0)