Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 23 for direntReclen (0.15 sec)

  1. src/internal/poll/fd_wasip1.go

    		if !ok {
    			break
    		}
    		size, ok := direntReclen(b)
    		if !ok {
    			break
    		}
    		if size > uint64(len(b)) {
    			break
    		}
    		fd.Dircookie = syscall.Dircookie(next)
    		b = b[size:]
    	}
    
    	// Trim a potentially incomplete trailing entry; this is necessary because
    	// the code in src/os/dir_unix.go does not deal well with partial values in
    	// calls to direntReclen, etc... and ends up causing an early EOF before all
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 14 20:14:02 UTC 2024
    - 6.7K bytes
    - Viewed (0)
  2. src/syscall/dirent.go

    // to names, and the new names slice.
    func ParseDirent(buf []byte, max int, names []string) (consumed int, count int, newnames []string) {
    	origlen := len(buf)
    	count = 0
    	for max != 0 && len(buf) > 0 {
    		reclen, ok := direntReclen(buf)
    		if !ok || reclen > uint64(len(buf)) {
    			return origlen, count, names
    		}
    		rec := buf[:reclen]
    		buf = buf[reclen:]
    		ino, ok := direntIno(rec)
    		if !ok {
    			break
    		}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 14 20:13:24 UTC 2024
    - 2.4K bytes
    - Viewed (0)
  3. src/syscall/syscall_js.go

    	Reclen uint16
    	Name   [256]byte
    }
    
    func direntIno(buf []byte) (uint64, bool) {
    	return 1, true
    }
    
    func direntReclen(buf []byte) (uint64, bool) {
    	return readInt(buf, unsafe.Offsetof(Dirent{}.Reclen), unsafe.Sizeof(Dirent{}.Reclen))
    }
    
    func direntNamlen(buf []byte) (uint64, bool) {
    	reclen, ok := direntReclen(buf)
    	if !ok {
    		return 0, false
    	}
    	return reclen - uint64(unsafe.Offsetof(Dirent{}.Name)), true
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Feb 26 21:03:59 UTC 2024
    - 6.7K bytes
    - Viewed (0)
  4. src/cmd/vendor/golang.org/x/sys/unix/dirent.go

    // to names, and the new names slice.
    func ParseDirent(buf []byte, max int, names []string) (consumed int, count int, newnames []string) {
    	origlen := len(buf)
    	count = 0
    	for max != 0 && len(buf) > 0 {
    		reclen, ok := direntReclen(buf)
    		if !ok || reclen > uint64(len(buf)) {
    			return origlen, count, names
    		}
    		rec := buf[:reclen]
    		buf = buf[reclen:]
    		ino, ok := direntIno(rec)
    		if !ok {
    			break
    		}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 19 23:33:33 UTC 2023
    - 3K bytes
    - Viewed (0)
  5. src/os/dir_unix.go

    				dirBufPool.Put(d.buf)
    				d.buf = nil
    				break // EOF
    			}
    		}
    
    		// Drain the buffer
    		buf := (*d.buf)[d.bufp:d.nbuf]
    		reclen, ok := direntReclen(buf)
    		if !ok || reclen > uint64(len(buf)) {
    			break
    		}
    		rec := buf[:reclen]
    		d.bufp += int(reclen)
    		ino, ok := direntIno(rec)
    		if !ok {
    			break
    		}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 14 20:11:45 UTC 2024
    - 4.8K bytes
    - Viewed (0)
  6. src/syscall/syscall_openbsd.go

    		if left > right {
    			break
    		}
    	}
    	return nil, EINVAL
    }
    
    func direntIno(buf []byte) (uint64, bool) {
    	return readInt(buf, unsafe.Offsetof(Dirent{}.Fileno), unsafe.Sizeof(Dirent{}.Fileno))
    }
    
    func direntReclen(buf []byte) (uint64, bool) {
    	return readInt(buf, unsafe.Offsetof(Dirent{}.Reclen), unsafe.Sizeof(Dirent{}.Reclen))
    }
    
    func direntNamlen(buf []byte) (uint64, bool) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Nov 02 10:34:00 UTC 2023
    - 7K bytes
    - Viewed (0)
  7. src/syscall/syscall_netbsd.go

    			return nil, EINVAL
    		}
    	}
    
    	return mib, nil
    }
    
    func direntIno(buf []byte) (uint64, bool) {
    	return readInt(buf, unsafe.Offsetof(Dirent{}.Fileno), unsafe.Sizeof(Dirent{}.Fileno))
    }
    
    func direntReclen(buf []byte) (uint64, bool) {
    	return readInt(buf, unsafe.Offsetof(Dirent{}.Reclen), unsafe.Sizeof(Dirent{}.Reclen))
    }
    
    func direntNamlen(buf []byte) (uint64, bool) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Sep 20 18:12:35 UTC 2023
    - 7.8K bytes
    - Viewed (0)
  8. src/syscall/syscall_aix.go

    	return readInt(buf, unsafe.Offsetof(Dirent{}.Ino), unsafe.Sizeof(Dirent{}.Ino))
    }
    
    func direntReclen(buf []byte) (uint64, bool) {
    	return readInt(buf, unsafe.Offsetof(Dirent{}.Reclen), unsafe.Sizeof(Dirent{}.Reclen))
    }
    
    func direntNamlen(buf []byte) (uint64, bool) {
    	reclen, ok := direntReclen(buf)
    	if !ok {
    		return 0, false
    	}
    	return reclen - uint64(unsafe.Offsetof(Dirent{}.Name)), true
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 13:50:55 UTC 2024
    - 17.9K bytes
    - Viewed (0)
  9. src/syscall/syscall_wasip1.go

    	Type Filetype
    	// Name of the directory entry.
    	Name *byte
    }
    
    func direntIno(buf []byte) (uint64, bool) {
    	return readInt(buf, unsafe.Offsetof(Dirent{}.Ino), unsafe.Sizeof(Dirent{}.Ino))
    }
    
    func direntReclen(buf []byte) (uint64, bool) {
    	namelen, ok := direntNamlen(buf)
    	return 24 + namelen, ok
    }
    
    func direntNamlen(buf []byte) (uint64, bool) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Feb 26 21:03:59 UTC 2024
    - 9.4K bytes
    - Viewed (0)
  10. src/cmd/vendor/golang.org/x/sys/unix/syscall_aix.go

    	return readInt(buf, unsafe.Offsetof(Dirent{}.Ino), unsafe.Sizeof(Dirent{}.Ino))
    }
    
    func direntReclen(buf []byte) (uint64, bool) {
    	return readInt(buf, unsafe.Offsetof(Dirent{}.Reclen), unsafe.Sizeof(Dirent{}.Reclen))
    }
    
    func direntNamlen(buf []byte) (uint64, bool) {
    	reclen, ok := direntReclen(buf)
    	if !ok {
    		return 0, false
    	}
    	return reclen - uint64(unsafe.Offsetof(Dirent{}.Name)), true
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Nov 29 21:28:33 UTC 2023
    - 16.1K bytes
    - Viewed (0)
Back to top