Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 48 for getdirentries (0.18 sec)

  1. src/syscall/getdirentries_test.go

    		}
    	}
    
    	// Read files using Getdirentries
    	var names2 []string
    	fd, err := syscall.Open(d, syscall.O_RDONLY, 0)
    	if err != nil {
    		t.Fatalf("Open: %v", err)
    	}
    	defer syscall.Close(fd)
    	var base uintptr
    	var buf [2048]byte
    	for {
    		n, err := syscall.Getdirentries(fd, buf[:], &base)
    		if err != nil {
    			t.Fatalf("Getdirentries: %v", err)
    		}
    		if n == 0 {
    			break
    		}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 2.1K bytes
    - Viewed (0)
  2. src/cmd/vendor/golang.org/x/sys/unix/readdirent_getdirentries.go

    	// 64 bits should be enough. (32 bits isn't even on 386). Since the
    	// actual system call is getdirentries64, 64 is a good guess.
    	// TODO(rsc): Can we use a single global basep for all calls?
    	var base = (*uintptr)(unsafe.Pointer(new(uint64)))
    	return Getdirentries(fd, buf, base)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 08 16:12:58 UTC 2024
    - 705 bytes
    - Viewed (0)
  3. src/syscall/syscall_freebsd.go

    }
    
    func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
    	if basep == nil || unsafe.Sizeof(*basep) == 8 {
    		return getdirentries(fd, buf, (*uint64)(unsafe.Pointer(basep)))
    	}
    	// The syscall needs a 64-bit base. On 32-bit machines
    	// we can't just use the basep passed in. See #32498.
    	var base uint64 = uint64(*basep)
    	n, err = getdirentries(fd, buf, &base)
    	*basep = uintptr(base)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Sep 20 18:12:35 UTC 2023
    - 8.7K bytes
    - Viewed (0)
  4. src/os/dir_darwin.go

    			break
    		}
    		// Darwin may return a zero inode when a directory entry has been
    		// deleted but not yet removed from the directory. The man page for
    		// getdirentries(2) states that programs are responsible for skipping
    		// those entries:
    		//
    		//   Users of getdirentries() should skip entries with d_fileno = 0,
    		//   as such entries represent files which have been deleted but not
    		//   yet removed from the directory entry.
    		//
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Apr 15 20:52:06 UTC 2024
    - 3.5K bytes
    - Viewed (0)
  5. src/cmd/vendor/golang.org/x/sys/unix/syscall_freebsd.go

    	return Fstatat(AT_FDCWD, path, st, AT_SYMLINK_NOFOLLOW)
    }
    
    func Getdents(fd int, buf []byte) (n int, err error) {
    	return Getdirentries(fd, buf, nil)
    }
    
    func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
    	if basep == nil || unsafe.Sizeof(*basep) == 8 {
    		return getdirentries(fd, buf, (*uint64)(unsafe.Pointer(basep)))
    	}
    	// The syscall needs a 64-bit base. On 32-bit machines
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Mar 07 05:26:45 UTC 2024
    - 15.6K bytes
    - Viewed (0)
  6. src/syscall/syscall_darwin.go

    		err = errnoErr(e1)
    	}
    	return
    }
    
    func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
    	// Simulate Getdirentries using fdopendir/readdir_r/closedir.
    	// We store the number of entries to skip in the seek
    	// offset of fd. See issue #31368.
    	// It's not the full required semantics, but should handle the case
    	// of calling Getdirentries or ReadDirent repeatedly.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:16:50 UTC 2024
    - 11K bytes
    - Viewed (0)
  7. src/cmd/vendor/golang.org/x/sys/unix/syscall_openbsd.go

    	}
    	var pp [2]_C_int
    	err := pipe2(&pp, flags)
    	if err == nil {
    		p[0] = int(pp[0])
    		p[1] = int(pp[1])
    	}
    	return err
    }
    
    //sys	Getdents(fd int, buf []byte) (n int, err error)
    
    func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
    	n, err = Getdents(fd, buf)
    	if err != nil || basep == nil {
    		return
    	}
    
    	var off int64
    	off, err = Seek(fd, 0, 1 /* SEEK_CUR */)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Nov 29 21:28:33 UTC 2023
    - 11K bytes
    - Viewed (0)
  8. src/os/dir_unix.go

    	"unsafe"
    )
    
    // Auxiliary information if the File describes a directory
    type dirInfo struct {
    	mu   sync.Mutex
    	buf  *[]byte // buffer for directory I/O
    	nbuf int     // length of buf; return value from Getdirentries
    	bufp int     // location of next record in buf.
    }
    
    const (
    	// More than 5760 to work around https://golang.org/issue/24015.
    	blockSize = 8192
    )
    
    var dirBufPool = sync.Pool{
    	New: func() any {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 14 20:11:45 UTC 2024
    - 4.8K bytes
    - Viewed (0)
  9. src/cmd/vendor/golang.org/x/sys/unix/syscall_netbsd.go

    	}
    	var pp [2]_C_int
    	err := pipe2(&pp, flags)
    	if err == nil {
    		p[0] = int(pp[0])
    		p[1] = int(pp[1])
    	}
    	return err
    }
    
    //sys	Getdents(fd int, buf []byte) (n int, err error)
    
    func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
    	n, err = Getdents(fd, buf)
    	if err != nil || basep == nil {
    		return
    	}
    
    	var off int64
    	off, err = Seek(fd, 0, 1 /* SEEK_CUR */)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Oct 10 16:32:44 UTC 2023
    - 12.3K bytes
    - Viewed (0)
  10. src/cmd/vendor/golang.org/x/sys/unix/syscall_darwin.go

    //go:cgo_import_dynamic libc_fdopendir fdopendir "/usr/lib/libSystem.B.dylib"
    
    func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
    	// Simulate Getdirentries using fdopendir/readdir_r/closedir.
    	// We store the number of entries to skip in the seek
    	// offset of fd. See issue #31368.
    	// It's not the full required semantics, but should handle the case
    	// of calling Getdirentries or ReadDirent repeatedly.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Oct 10 16:32:44 UTC 2023
    - 20.7K bytes
    - Viewed (0)
Back to top