Search Options

Results per page
Sort
Preferred Languages
Advance

Results 51 - 60 of 210 for readdirp (0.11 sec)

  1. src/image/png/fuzz_test.go

    import (
    	"bytes"
    	"image"
    	"os"
    	"path/filepath"
    	"strings"
    	"testing"
    )
    
    func FuzzDecode(f *testing.F) {
    	if testing.Short() {
    		f.Skip("Skipping in short mode")
    	}
    
    	testdata, err := os.ReadDir("../testdata")
    	if err != nil {
    		f.Fatalf("failed to read testdata directory: %s", err)
    	}
    	for _, de := range testdata {
    		if de.IsDir() || !strings.HasSuffix(de.Name(), ".png") {
    			continue
    		}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Aug 03 15:56:27 UTC 2023
    - 1.6K bytes
    - Viewed (0)
  2. pkg/util/filesystem/filesystem.go

    	RemoveAll(path string) error
    	Remove(name string) error
    
    	// from "os"
    	ReadFile(filename string) ([]byte, error)
    	TempDir(dir, prefix string) (string, error)
    	TempFile(dir, prefix string) (File, error)
    	ReadDir(dirname string) ([]os.DirEntry, error)
    	Walk(root string, walkFn filepath.WalkFunc) error
    }
    
    // File is an interface that we can use to mock various filesystem operations typically
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Apr 13 01:02:46 UTC 2023
    - 1.6K bytes
    - Viewed (0)
  3. src/image/jpeg/fuzz_test.go

    import (
    	"bytes"
    	"image"
    	"os"
    	"path/filepath"
    	"strings"
    	"testing"
    )
    
    func FuzzDecode(f *testing.F) {
    	if testing.Short() {
    		f.Skip("Skipping in short mode")
    	}
    
    	testdata, err := os.ReadDir("../testdata")
    	if err != nil {
    		f.Fatalf("failed to read testdata directory: %s", err)
    	}
    	for _, de := range testdata {
    		if de.IsDir() || !strings.HasSuffix(de.Name(), ".jpeg") {
    			continue
    		}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Aug 03 15:56:27 UTC 2023
    - 1.4K bytes
    - Viewed (0)
  4. src/os/os_unix_test.go

    	d, err := Open(dir)
    	if err != nil {
    		t.Fatal(err)
    	}
    	defer d.Close()
    	fis, err := d.Readdir(2) // notably, greater than zero
    	if len(fis) == 0 && err == nil {
    		// This is what used to happen (Issue 16919)
    		t.Fatal("Readdir = empty slice & err == nil")
    	}
    	if len(fis) != 0 || err != io.EOF {
    		t.Errorf("Readdir = %d entries: %v; want 0, io.EOF", len(fis), err)
    		for i, fi := range fis {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Sep 18 17:32:43 UTC 2023
    - 11.5K bytes
    - Viewed (0)
  5. src/os/dir_windows.go

    		return &buf
    	},
    }
    
    func (d *dirInfo) close() {
    	d.h = 0
    	if d.buf != nil {
    		dirBufPool.Put(d.buf)
    		d.buf = nil
    	}
    }
    
    // allowReadDirFileID indicates whether File.readdir should try to use FILE_ID_BOTH_DIR_INFO
    // if the underlying file system supports it.
    // Useful for testing purposes.
    var allowReadDirFileID = true
    
    func (d *dirInfo) init(h syscall.Handle) {
    	d.h = h
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Apr 15 20:52:06 UTC 2024
    - 7.7K bytes
    - Viewed (0)
  6. src/testing/fstest/mapfs.go

    	return fs.ReadFile(fsOnly{fsys}, name)
    }
    
    func (fsys MapFS) Stat(name string) (fs.FileInfo, error) {
    	return fs.Stat(fsOnly{fsys}, name)
    }
    
    func (fsys MapFS) ReadDir(name string) ([]fs.DirEntry, error) {
    	return fs.ReadDir(fsOnly{fsys}, name)
    }
    
    func (fsys MapFS) Glob(pattern string) ([]string, error) {
    	return fs.Glob(fsOnly{fsys}, pattern)
    }
    
    type noSub struct {
    	MapFS
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 7.1K bytes
    - Viewed (0)
  7. src/cmd/go/internal/modfetch/codehost/git_test.go

    			if err != nil {
    				t.Fatal(err)
    			}
    			rc, err := r.ReadZip(ctx, tt.rev, tt.subdir, 100000)
    			if err != nil {
    				if tt.err == "" {
    					t.Fatalf("ReadZip: unexpected error %v", err)
    				}
    				if !strings.Contains(err.Error(), tt.err) {
    					t.Fatalf("ReadZip: wrong error %q, want %q", err, tt.err)
    				}
    				if rc != nil {
    					t.Errorf("ReadZip: non-nil io.ReadCloser with error %v", err)
    				}
    				return
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Dec 14 19:46:23 UTC 2023
    - 18.9K bytes
    - Viewed (0)
  8. pkg/volume/emptydir/empty_dir.go

    			// In this case, delete ready file and print a warning for it.
    			klog.Warningf("volume ready file dir %s exist, but volume dir %s does not. Remove ready dir", readyDir, dir)
    			if err := os.RemoveAll(readyDir); err != nil && !os.IsNotExist(err) {
    				klog.Warningf("failed to remove ready dir [%s]: %v", readyDir, err)
    			}
    		}
    	}
    
    	switch {
    	case ed.medium == v1.StorageMediumDefault:
    		err = ed.setupDir(dir)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue May 21 10:18:16 UTC 2024
    - 19K bytes
    - Viewed (0)
  9. 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: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Mon Dec 11 19:10:54 UTC 2023
    - 1.5K bytes
    - Viewed (0)
  10. src/image/gif/fuzz_test.go

    import (
    	"bytes"
    	"image"
    	"os"
    	"path/filepath"
    	"strings"
    	"testing"
    )
    
    func FuzzDecode(f *testing.F) {
    	if testing.Short() {
    		f.Skip("Skipping in short mode")
    	}
    
    	testdata, err := os.ReadDir("../testdata")
    	if err != nil {
    		f.Fatalf("failed to read testdata directory: %s", err)
    	}
    	for _, de := range testdata {
    		if de.IsDir() || !strings.HasSuffix(de.Name(), ".gif") {
    			continue
    		}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Sep 27 15:57:34 UTC 2022
    - 1.4K bytes
    - Viewed (0)
Back to top