Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 210 for readdirp (0.12 sec)

  1. internal/s3select/json/preader_test.go

    package json
    
    import (
    	"bytes"
    	"io"
    	"os"
    	"path/filepath"
    	"testing"
    
    	"github.com/minio/minio/internal/s3select/sql"
    )
    
    func TestNewPReader(t *testing.T) {
    	files, err := os.ReadDir("testdata")
    	if err != nil {
    		t.Fatal(err)
    	}
    	for _, file := range files {
    		t.Run(file.Name(), func(t *testing.T) {
    			f, err := os.Open(filepath.Join("testdata", file.Name()))
    			if err != nil {
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Mon Sep 19 18:05:16 UTC 2022
    - 2.5K bytes
    - Viewed (0)
  2. internal/s3select/json/reader_test.go

    package json
    
    import (
    	"bytes"
    	"io"
    	"os"
    	"path/filepath"
    	"testing"
    
    	"github.com/minio/minio/internal/s3select/sql"
    )
    
    func TestNewReader(t *testing.T) {
    	files, err := os.ReadDir("testdata")
    	if err != nil {
    		t.Fatal(err)
    	}
    	for _, file := range files {
    		t.Run(file.Name(), func(t *testing.T) {
    			f, err := os.Open(filepath.Join("testdata", file.Name()))
    			if err != nil {
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Mon Sep 19 18:05:16 UTC 2022
    - 2.5K bytes
    - Viewed (0)
  3. pkg/util/filesystem/defaultfs.go

    	file, err := os.CreateTemp(fs.prefix(dir), prefix)
    	if err != nil {
    		return nil, err
    	}
    	return &defaultFile{file}, nil
    }
    
    // ReadDir via os.ReadDir
    func (fs *DefaultFs) ReadDir(dirname string) ([]os.DirEntry, error) {
    	return os.ReadDir(fs.prefix(dirname))
    }
    
    // Walk via filepath.Walk
    func (fs *DefaultFs) Walk(root string, walkFn filepath.WalkFunc) error {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Oct 03 07:38:14 UTC 2023
    - 4.7K bytes
    - Viewed (0)
  4. src/io/fs/glob_test.go

    			t.Errorf("Glob(%s) = %v, %v, want %v, nil", desc, names, err, []string{"hello.txt"})
    		}
    	}
    
    	// Test that ReadDir uses the method when present.
    	names, err := Glob(globOnly{testFsys}, "*.txt")
    	check("readDirOnly", names, err)
    
    	// Test that ReadDir uses Open when the method is not present.
    	names, err = Glob(openOnly{testFsys}, "*.txt")
    	check("openOnly", names, err)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 07 18:36:52 UTC 2024
    - 2.3K bytes
    - Viewed (0)
  5. src/io/fs/sub.go

    	if err != nil {
    		return nil, err
    	}
    	file, err := f.fsys.Open(full)
    	return file, f.fixErr(err)
    }
    
    func (f *subFS) ReadDir(name string) ([]DirEntry, error) {
    	full, err := f.fullName("read", name)
    	if err != nil {
    		return nil, err
    	}
    	dir, err := ReadDir(f.fsys, full)
    	return dir, f.fixErr(err)
    }
    
    func (f *subFS) ReadFile(name string) ([]byte, error) {
    	full, err := f.fullName("read", name)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sat Feb 10 02:10:17 UTC 2024
    - 3.6K bytes
    - Viewed (0)
  6. src/crypto/x509/root_unix.go

    	if roots.len() > 0 || firstErr == nil {
    		return roots, nil
    	}
    
    	return nil, firstErr
    }
    
    // readUniqueDirectoryEntries is like os.ReadDir but omits
    // symlinks that point within the directory.
    func readUniqueDirectoryEntries(dir string) ([]fs.DirEntry, error) {
    	files, err := os.ReadDir(dir)
    	if err != nil {
    		return nil, err
    	}
    	uniq := files[:0]
    	for _, f := range files {
    		if !isSameDirSymlink(f, dir) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 11 20:54:07 UTC 2023
    - 2.7K bytes
    - Viewed (0)
  7. src/testing/fstest/testfs_test.go

    	if err != nil {
    		return nil, err
    	}
    	return &shuffledFile{File: f}, nil
    }
    
    type shuffledFile struct{ fs.File }
    
    func (f *shuffledFile) ReadDir(n int) ([]fs.DirEntry, error) {
    	dirents, err := f.File.(fs.ReadDirFile).ReadDir(n)
    	// Shuffle in a deterministic way, all we care about is making sure that the
    	// list of directory entries is not is the lexicographic order.
    	//
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 2.9K bytes
    - Viewed (0)
  8. 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 Jun 16 00:44:34 UTC 2024
    - Last Modified: Fri Apr 05 15:17:08 UTC 2024
    - 1K bytes
    - Viewed (0)
  9. src/syscall/dirent_test.go

    			// Try a bigger buffer.
    			t.Logf("ReadDirent: %v; retrying with larger buffer", err)
    			buf = bytes.Repeat([]byte{0xCD}, len(buf)*2)
    			continue
    		}
    		if err != nil {
    			t.Fatalf("syscall.readdir: %v", err)
    		}
    		t.Logf("ReadDirent: read %d bytes", n)
    		if n == 0 {
    			break
    		}
    
    		var consumed, count int
    		consumed, count, names = syscall.ParseDirent(buf[:n], -1, names)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 3.4K bytes
    - Viewed (0)
  10. src/internal/goroot/gccgo.go

    // given goroot and compiler.
    func IsStandardPackage(goroot, compiler, path string) bool {
    	switch compiler {
    	case "gc":
    		dir := filepath.Join(goroot, "src", path)
    		dirents, err := os.ReadDir(dir)
    		if err != nil {
    			return false
    		}
    		for _, dirent := range dirents {
    			if strings.HasSuffix(dirent.Name(), ".go") {
    				return true
    			}
    		}
    		return false
    	case "gccgo":
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Feb 08 18:16:28 UTC 2024
    - 758 bytes
    - Viewed (0)
Back to top