github.com/JimmyHuang454/JLS-go@v0.0.0-20230831150107-90d536585ba0/internal/syscall/unix/at_libc2.go (about) 1 // Copyright 2018 The Go Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style 3 // license that can be found in the LICENSE file. 4 5 //go:build darwin || (openbsd && !mips64) 6 7 package unix 8 9 import ( 10 "syscall" 11 _ "unsafe" // for linkname 12 ) 13 14 func Unlinkat(dirfd int, path string, flags int) error { 15 return unlinkat(dirfd, path, flags) 16 } 17 18 func Openat(dirfd int, path string, flags int, perm uint32) (int, error) { 19 return openat(dirfd, path, flags, perm) 20 } 21 22 func Fstatat(dirfd int, path string, stat *syscall.Stat_t, flags int) error { 23 return fstatat(dirfd, path, stat, flags) 24 } 25 26 //go:linkname unlinkat syscall.unlinkat 27 func unlinkat(dirfd int, path string, flags int) error 28 29 //go:linkname openat syscall.openat 30 func openat(dirfd int, path string, flags int, perm uint32) (int, error) 31 32 //go:linkname fstatat syscall.fstatat 33 func fstatat(dirfd int, path string, stat *syscall.Stat_t, flags int) error