Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 210 for readdirp (0.21 sec)

  1. kotlin-js-store/yarn.lock

      dependencies:
        bytes "3.1.2"
        http-errors "2.0.0"
        iconv-lite "0.4.24"
        unpipe "1.0.0"
    
    readdirp@~3.6.0:
      version "3.6.0"
      resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.6.0.tgz#74a370bd857116e245b29cc97340cd431a02a6c7"
      integrity sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==
      dependencies:
    Registered: Sun Jun 16 04:42:17 UTC 2024
    - Last Modified: Sat Jul 22 12:28:51 UTC 2023
    - 87.4K bytes
    - Viewed (0)
  2. src/io/fs/readdir.go

    //
    // If fs implements [ReadDirFS], ReadDir calls fs.ReadDir.
    // Otherwise ReadDir calls fs.Open and uses ReadDir and Close
    // on the returned file.
    func ReadDir(fsys FS, name string) ([]DirEntry, error) {
    	if fsys, ok := fsys.(ReadDirFS); ok {
    		return fsys.ReadDir(name)
    	}
    
    	file, err := fsys.Open(name)
    	if err != nil {
    		return nil, err
    	}
    	defer file.Close()
    
    	dir, ok := file.(ReadDirFile)
    	if !ok {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 1.9K bytes
    - Viewed (0)
  3. cmd/os-readdir-common.go

    // along with this program.  If not, see <http://www.gnu.org/licenses/>.
    
    package cmd
    
    // Options for readDir function call
    type readDirOpts struct {
    	// The maximum number of entries to return
    	count int
    	// Follow directory symlink
    	followDirSymlink bool
    }
    
    // Return all the entries at the directory dirPath.
    func readDir(dirPath string) (entries []string, err error) {
    	return readDirWithOpts(dirPath, readDirOpts{count: -1})
    }
    
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Fri Jul 09 23:20:51 UTC 2021
    - 1.3K bytes
    - Viewed (0)
  4. 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)
  5. 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)
  6. 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 Jun 16 00:44:34 UTC 2024
    - Last Modified: Fri Apr 05 15:17:08 UTC 2024
    - 1.4K bytes
    - Viewed (0)
  7. pkg/kubelet/container/testing/os.go

    // Pipe is a fake call that returns nil.
    func (*FakeOS) Pipe() (r *os.File, w *os.File, err error) {
    	return nil, nil, nil
    }
    
    // ReadDir is a fake call that returns the files under the directory.
    func (f *FakeOS) ReadDir(dirname string) ([]os.DirEntry, error) {
    	if f.ReadDirFn != nil {
    		return f.ReadDirFn(dirname)
    	}
    	return nil, nil
    }
    
    // Glob is a fake call that returns list of virtual files matching a pattern.
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Feb 07 13:37:31 UTC 2023
    - 3.7K bytes
    - Viewed (0)
  8. cmd/os_other.go

    	// baseDir is not honored in plan9 and solaris platforms.
    	return os.MkdirAll(dirPath, perm)
    }
    
    // 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, filter func(name string, typ os.FileMode) error) error {
    	d, err := Open(dirPath)
    	if err != nil {
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Wed Sep 13 15:14:36 UTC 2023
    - 4K bytes
    - Viewed (0)
  9. 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)
  10. 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)
Back to top