Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 184 for xreaddir (0.12 sec)

  1. 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)
  2. src/cmd/vendor/golang.org/x/arch/x86/x86asm/decode.go

    	xCondAddrSize // switch on address size
    	xCondIsMem    // switch on memory vs register argument
    
    	xSetOp // set instruction opcode
    
    	xReadSlashR // read /r
    	xReadIb     // read ib
    	xReadIw     // read iw
    	xReadId     // read id
    	xReadIo     // read io
    	xReadCb     // read cb
    	xReadCw     // read cw
    	xReadCd     // read cd
    	xReadCp     // read cp
    	xReadCm     // read cm
    
    	xArg1            // arg 1
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Feb 10 18:59:52 UTC 2023
    - 45.1K bytes
    - Viewed (0)
  3. 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)
  4. 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)
  5. 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)
  6. 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)
  7. 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)
  8. 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)
  9. 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)
  10. cmd/os_other.go

    		if osErrToFileErr(err) == errFileNotFound {
    			return nil
    		}
    		return osErrToFileErr(err)
    	}
    	defer d.Close()
    
    	maxEntries := 1000
    	for {
    		// Read up to max number of entries.
    		fis, err := d.Readdir(maxEntries)
    		if err != nil {
    			if err == io.EOF {
    				break
    			}
    			err = osErrToFileErr(err)
    			if err == errFileNotFound {
    				return nil
    			}
    			return err
    		}
    		for _, fi := range fis {
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Wed Sep 13 15:14:36 UTC 2023
    - 4K bytes
    - Viewed (0)
Back to top