Search Options

Results per page
Sort
Preferred Languages
Advance

Results 41 - 50 of 210 for readdirp (0.14 sec)

  1. src/io/fs/glob.go

    // The only possible returned error is [path.ErrBadPattern], reporting that
    // the pattern is malformed.
    //
    // If fs implements [GlobFS], Glob calls fs.Glob.
    // Otherwise, Glob uses [ReadDir] to traverse the directory tree
    // and look for matches for the pattern.
    func Glob(fsys FS, pattern string) (matches []string, err error) {
    	return globWithLimit(fsys, pattern, 0)
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Oct 11 20:25:50 UTC 2023
    - 3.1K bytes
    - Viewed (0)
  2. src/cmd/go/internal/modfetch/codehost/vcs.go

    	defer unlock()
    
    	return false, vcsErrorf("vcs %s: DescendsFrom: %w", r.cmd.vcs, errors.ErrUnsupported)
    }
    
    func (r *vcsRepo) ReadZip(ctx context.Context, rev, subdir string, maxSize int64) (zip io.ReadCloser, err error) {
    	if r.cmd.readZip == nil && r.cmd.doReadZip == nil {
    		return nil, vcsErrorf("vcs %s: ReadZip: %w", r.cmd.vcs, errors.ErrUnsupported)
    	}
    
    	unlock, err := r.mu.Lock()
    	if err != nil {
    		return nil, err
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sun Apr 14 18:50:24 UTC 2024
    - 17.3K bytes
    - Viewed (0)
  3. src/net/http/fs.go

    	// Prefer to use ReadDir instead of Readdir,
    	// because the former doesn't require calling
    	// Stat on every entry of a directory on Unix.
    	var dirs anyDirs
    	var err error
    	if d, ok := f.(fs.ReadDirFile); ok {
    		var list dirEntryDirs
    		list, err = d.ReadDir(-1)
    		dirs = list
    	} else {
    		var list fileInfoDirs
    		list, err = f.Readdir(-1)
    		dirs = list
    	}
    
    	if err != nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 09 17:06:47 UTC 2024
    - 31.1K bytes
    - Viewed (0)
  4. 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: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Fri Apr 12 21:47:31 UTC 2024
    - 3.9K bytes
    - Viewed (0)
  5. src/cmd/vendor/golang.org/x/telemetry/internal/upload/findwork.go

    // and uploading is supposed to be idempotent.)
    func (u *uploader) findWork() work {
    	localdir, uploaddir := u.dir.LocalDir(), u.dir.UploadDir()
    	var ans work
    	fis, err := os.ReadDir(localdir)
    	if err != nil {
    		u.logger.Printf("Could not find work: failed to read local dir %s: %v", localdir, err)
    		return ans
    	}
    
    	mode, asof := u.dir.Mode()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 15 21:12:15 UTC 2024
    - 3.4K bytes
    - Viewed (0)
  6. src/os/file.go

    	}
    	return b, nil
    }
    
    // ReadDir reads the named directory, returning all its directory entries sorted
    // by filename. Through this method, dirFS implements [io/fs.ReadDirFS].
    func (dir dirFS) ReadDir(name string) ([]DirEntry, error) {
    	fullname, err := dir.join(name)
    	if err != nil {
    		return nil, &PathError{Op: "readdir", Path: name, Err: err}
    	}
    	entries, err := ReadDir(fullname)
    	if err != nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Apr 26 23:07:37 UTC 2024
    - 25.4K bytes
    - Viewed (0)
  7. src/internal/poll/fd_opendir_darwin.go

    // license that can be found in the LICENSE file.
    
    package poll
    
    import (
    	"syscall"
    	_ "unsafe" // for go:linkname
    )
    
    // OpenDir returns a pointer to a DIR structure suitable for
    // ReadDir. In case of an error, the name of the failed
    // syscall is returned along with a syscall.Errno.
    func (fd *FD) OpenDir() (uintptr, string, error) {
    	// fdopendir(3) takes control of the file descriptor,
    	// so use a dup.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 05 17:54:15 UTC 2022
    - 918 bytes
    - Viewed (0)
  8. src/os/stat_test.go

    	if parentdir == "" || base == "" {
    		// skip os.Readdir test of files without directory or file name component,
    		// such as directories with slash at the end or Windows device names.
    		return
    	}
    
    	parent, err := os.Open(parentdir)
    	if err != nil {
    		t.Error(err)
    		return
    	}
    	defer parent.Close()
    
    	fis, err := parent.Readdir(-1)
    	if err != nil {
    		t.Error(err)
    		return
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Apr 03 22:38:03 UTC 2024
    - 7.8K bytes
    - Viewed (0)
  9. src/cmd/go/testdata/script/test_fuzz_err_deadlock.txt

    	"testing"
    	"time"
    )
    
    func FuzzDead(f *testing.F) {
    	go func() {
    		c := filepath.Join(os.Getenv("GOCACHE"), "fuzz", "test", "FuzzDead")
    		t := time.NewTicker(time.Second)
    		for range t.C {
    			files, _ := os.ReadDir(c)
    			if len(files) > 0 {
    				os.RemoveAll(c)
    			}
    		}
    	}()
    
    	f.Fuzz(func(t *testing.T, b []byte) {
    		if len(b) == 8 &&
    			b[0] == 'h' &&
    			b[1] == 'e' &&
    			b[2] == 'l' &&
    			b[3] == 'l' &&
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Mar 16 19:51:23 UTC 2023
    - 999 bytes
    - Viewed (0)
  10. hack/conformance/check_conformance_test_requirements.go

    	}
    	if checkFailed {
    		return errors.New("We need to fix the above errors.")
    	}
    	return nil
    }
    
    func processFile(e2ePath string) error {
    	regGoFile := regexp.MustCompile(`.*\.go`)
    
    	files, err := os.ReadDir(e2ePath)
    	if err != nil {
    		return fmt.Errorf("Failed to read dir %s: %w", e2ePath, err)
    	}
    	for _, file := range files {
    		if file.IsDir() {
    			continue
    		}
    		if !regGoFile.MatchString(file.Name()) {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Sep 29 06:30:57 UTC 2023
    - 4.1K bytes
    - Viewed (0)
Back to top