- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 1,084 for Dirent (0.11 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/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/syscall/syscall_darwin.go
func direntIno(buf []byte) (uint64, bool) { 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) { return readInt(buf, unsafe.Offsetof(Dirent{}.Namlen), unsafe.Sizeof(Dirent{}.Namlen)) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:16:50 UTC 2024 - 11K bytes - Viewed (0) -
src/internal/poll/fd_wasip1.go
// https://github.com/WebAssembly/WASI/blob/main/legacy/preview1/docs.md#-dirent-record const sizeOfDirent = 24 func direntReclen(buf []byte) (uint64, bool) { namelen, ok := direntNamlen(buf) return sizeOfDirent + namelen, ok } func direntNamlen(buf []byte) (uint64, bool) { return readInt(buf, unsafe.Offsetof(syscall.Dirent{}.Namlen), unsafe.Sizeof(syscall.Dirent{}.Namlen)) } func direntNext(buf []byte) (uint64, bool) {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue May 14 20:14:02 UTC 2024 - 6.7K bytes - Viewed (0) -
src/cmd/go/script_test.go
localDir := filepath.Join(telemetryDir, "local") dirents, err := os.ReadDir(localDir) if err != nil { if os.IsNotExist(err) { return nil // The Go command didn't ever run so the local dir wasn't created } t.Fatalf("reading telemetry local dir: %v", err) } totals := map[string]uint64{} for _, dirent := range dirents { if dirent.IsDir() || !strings.HasSuffix(dirent.Name(), ".count") { // not a counter file
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 03 18:15:22 UTC 2024 - 12.2K bytes - Viewed (0) -
src/cmd/vendor/golang.org/x/sys/unix/syscall_freebsd.go
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) { return readInt(buf, unsafe.Offsetof(Dirent{}.Namlen), unsafe.Sizeof(Dirent{}.Namlen)) } func Pipe(p []int) (err error) {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Mar 07 05:26:45 UTC 2024 - 15.6K bytes - Viewed (0) -
src/syscall/syscall_aix.go
} return setgroups(len(a), &a[0]) } func direntIno(buf []byte) (uint64, bool) { 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
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 29 13:50:55 UTC 2024 - 17.9K bytes - Viewed (0) -
src/syscall/dirent_test.go
} func TestDirentRepeat(t *testing.T) { const N = 100 // Note: the size of the buffer is small enough that the loop // below will need to execute multiple times. See issue #31368. size := N * unsafe.Offsetof(syscall.Dirent{}.Name) / 4 if runtime.GOOS == "freebsd" || runtime.GOOS == "netbsd" { if size < 1024 { size = 1024 // DIRBLKSIZ, see issue 31403. } } // Make a directory containing N files d := t.TempDir()
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:00:11 UTC 2024 - 3.4K bytes - Viewed (0) -
src/os/dir_unix.go
if IsNotExist(err) { // File disappeared between readdir and stat. // Treat as if it didn't exist. continue } if err != nil { return nil, dirents, nil, err } dirents = append(dirents, de) } else { info, err := lstat(f.name + "/" + string(name)) if IsNotExist(err) { // File disappeared between readdir + stat. // Treat as if it didn't exist. continue
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue May 14 20:11:45 UTC 2024 - 4.8K bytes - Viewed (0)