D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
proc
/
3206095
/
root
/
opt
/
golang
/
1.22.0
/
src
/
internal
/
syscall
/
unix
/
Filename :
eaccess_bsd.go
back
Copy
// Copyright 2023 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. //go:build dragonfly || freebsd || netbsd package unix import ( "syscall" "unsafe" ) func faccessat(dirfd int, path string, mode uint32, flags int) error { p, err := syscall.BytePtrFromString(path) if err != nil { return err } _, _, errno := syscall.Syscall6(syscall.SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(p)), uintptr(mode), uintptr(flags), 0, 0) if errno != 0 { return errno } return err } func Eaccess(path string, mode uint32) error { return faccessat(AT_FDCWD, path, mode, AT_EACCESS) }