- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 3,178 for Dirent (0.28 sec)
-
src/syscall/dirent.go
} // See src/os/dir_unix.go for the reason why this condition is // excluded on wasip1. if ino == 0 && runtime.GOOS != "wasip1" { // File absent in directory. continue } const namoff = uint64(unsafe.Offsetof(Dirent{}.Name)) namlen, ok := direntNamlen(rec) if !ok || namoff+namlen > uint64(len(rec)) { break } name := rec[namoff : namoff+namlen] for i, c := range name { if c == 0 { name = name[:i]
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue May 14 20:13:24 UTC 2024 - 2.4K bytes - Viewed (0) -
src/cmd/vendor/golang.org/x/sys/unix/dirent.go
} rec := buf[:reclen] buf = buf[reclen:] ino, ok := direntIno(rec) if !ok { break } if ino == 0 { // File absent in directory. continue } const namoff = uint64(unsafe.Offsetof(Dirent{}.Name)) namlen, ok := direntNamlen(rec) if !ok || namoff+namlen > uint64(len(rec)) { break } name := rec[namoff : namoff+namlen] for i, c := range name { if c == 0 { name = name[:i]
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Oct 19 23:33:33 UTC 2023 - 3K bytes - Viewed (0) -
src/syscall/getdirentries_test.go
for len(data) > 0 { // If multiple Dirents are written into buf, sometimes when we reach the final one, // we have cap(buf) < Sizeof(Dirent). So use an appropriate slice to copy from data. var dirent syscall.Dirent copy((*[unsafe.Sizeof(dirent)]byte)(unsafe.Pointer(&dirent))[:], data) data = data[dirent.Reclen:] name := make([]byte, dirent.Namlen) for i := 0; i < int(dirent.Namlen); i++ { name[i] = byte(dirent.Name[i])
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:00:11 UTC 2024 - 2.1K bytes - Viewed (0) -
src/os/dir_darwin.go
d.close() } size := n if size <= 0 { size = 100 n = -1 } var dirent syscall.Dirent var entptr *syscall.Dirent for len(names)+len(dirents)+len(infos) < size || n == -1 { if errno := readdir_r(d.dir, &dirent, &entptr); errno != 0 { if errno == syscall.EINTR { continue } return names, dirents, infos, &PathError{Op: "readdir", Path: f.name, Err: errno} } if entptr == nil { // EOF
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Apr 15 20:52:06 UTC 2024 - 3.5K bytes - Viewed (0) -
src/os/dirent_aix.go
import ( "syscall" "unsafe" ) func direntIno(buf []byte) (uint64, bool) { return readInt(buf, unsafe.Offsetof(syscall.Dirent{}.Ino), unsafe.Sizeof(syscall.Dirent{}.Ino)) } func direntReclen(buf []byte) (uint64, bool) { return readInt(buf, unsafe.Offsetof(syscall.Dirent{}.Reclen), unsafe.Sizeof(syscall.Dirent{}.Reclen)) } func direntNamlen(buf []byte) (uint64, bool) { reclen, ok := direntReclen(buf) if !ok {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Oct 20 00:59:20 UTC 2020 - 759 bytes - Viewed (0) -
src/os/dirent_freebsd.go
return readInt(buf, unsafe.Offsetof(syscall.Dirent{}.Fileno), unsafe.Sizeof(syscall.Dirent{}.Fileno)) } func direntReclen(buf []byte) (uint64, bool) { return readInt(buf, unsafe.Offsetof(syscall.Dirent{}.Reclen), unsafe.Sizeof(syscall.Dirent{}.Reclen)) } func direntNamlen(buf []byte) (uint64, bool) { return readInt(buf, unsafe.Offsetof(syscall.Dirent{}.Namlen), unsafe.Sizeof(syscall.Dirent{}.Namlen)) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Oct 20 00:59:20 UTC 2020 - 1.2K bytes - Viewed (0) -
src/os/dirent_openbsd.go
return readInt(buf, unsafe.Offsetof(syscall.Dirent{}.Fileno), unsafe.Sizeof(syscall.Dirent{}.Fileno)) } func direntReclen(buf []byte) (uint64, bool) { return readInt(buf, unsafe.Offsetof(syscall.Dirent{}.Reclen), unsafe.Sizeof(syscall.Dirent{}.Reclen)) } func direntNamlen(buf []byte) (uint64, bool) { return readInt(buf, unsafe.Offsetof(syscall.Dirent{}.Namlen), unsafe.Sizeof(syscall.Dirent{}.Namlen)) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Oct 20 00:59:20 UTC 2020 - 1.2K bytes - Viewed (0) -
cmd/os-dirent_namelen_linux.go
package cmd import ( "bytes" "fmt" "syscall" "unsafe" ) func direntNamlen(dirent *syscall.Dirent) (uint64, error) { const fixedHdr = uint16(unsafe.Offsetof(syscall.Dirent{}.Name)) nameBuf := (*[unsafe.Sizeof(dirent.Name)]byte)(unsafe.Pointer(&dirent.Name[0])) const nameBufLen = uint16(len(nameBuf)) limit := dirent.Reclen - fixedHdr if limit > nameBufLen { limit = nameBufLen } // Avoid bugs in long file names
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Thu Aug 19 01:35:22 UTC 2021 - 1.5K bytes - Viewed (0) -
src/os/dirent_solaris.go
import ( "syscall" "unsafe" ) func direntIno(buf []byte) (uint64, bool) { return readInt(buf, unsafe.Offsetof(syscall.Dirent{}.Ino), unsafe.Sizeof(syscall.Dirent{}.Ino)) } func direntReclen(buf []byte) (uint64, bool) { return readInt(buf, unsafe.Offsetof(syscall.Dirent{}.Reclen), unsafe.Sizeof(syscall.Dirent{}.Reclen)) } func direntNamlen(buf []byte) (uint64, bool) { reclen, ok := direntReclen(buf) if !ok {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Oct 20 00:59:20 UTC 2020 - 759 bytes - Viewed (0) -
src/os/dirent_linux.go
import ( "syscall" "unsafe" ) func direntIno(buf []byte) (uint64, bool) { return readInt(buf, unsafe.Offsetof(syscall.Dirent{}.Ino), unsafe.Sizeof(syscall.Dirent{}.Ino)) } func direntReclen(buf []byte) (uint64, bool) { return readInt(buf, unsafe.Offsetof(syscall.Dirent{}.Reclen), unsafe.Sizeof(syscall.Dirent{}.Reclen)) } func direntNamlen(buf []byte) (uint64, bool) { reclen, ok := direntReclen(buf) if !ok {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Oct 20 00:59:20 UTC 2020 - 1.2K bytes - Viewed (0)