Documentation ¶
Index ¶
- Constants
- Variables
- func Close(fd int) error
- func FileStatToUnixMode(fsMode os.FileMode) uint32
- func Fstat(fd int, stat *Stat_t) error
- func Fstatat(dirfd int, pathname string, stat *unix.Stat_t, flags int) error
- func Getdents(fd int, buf []byte) (int, error)
- func Makedev(major, minor uint64) (uint64, error)
- func Open(path string, mode int, perm uint32) (int, error)
- func Openat(dirfd int, path string, flags int, mode uint32) (int, error)
- func Pread(fd int, p []byte, offset int64) (int, error)
- func Read(fd int, p []byte) (int, error)
- func Readlinkat(dirfd int, path string, buf []byte) (int, error)
- func RetrySyscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (uintptr, uintptr, error)
- func RetrySyscallE(callSyscallE func() error) error
- func RetrySyscallIE(callSyscallIE func() (int, error)) (int, error)
- func S_ISBLK(mode uint32) bool
- func S_ISCHR(mode uint32) bool
- func S_ISDIR(mode uint32) bool
- func S_ISLNK(mode uint32) bool
- func S_ISREG(mode uint32) bool
- func Stat(path string, stat *Stat_t) error
- func Statfs(path string, buf *Statfs_t) error
- func TestAccess(user, group bool, mode, mask uint32) bool
- func UnixToFileStatMode(unixMode uint32) os.FileMode
- type Errno
- type Stat_t
- type Statfs_t
Constants ¶
View Source
const ( NAME_MAX = 255 PATH_MAX = 4096 PATH_MAX_LIMIT = 1 << 16 O_NOFOLLOW = unix.O_NOFOLLOW O_PATH = unix.O_PATH O_RDONLY = unix.O_RDONLY O_RDWR = unix.O_RDWR O_WRONLY = unix.O_WRONLY S_IFMT = unix.S_IFMT S_IFBLK = unix.S_IFBLK S_IFCHR = unix.S_IFCHR S_IFDIR = unix.S_IFDIR S_IFIFO = unix.S_IFIFO S_IFLNK = unix.S_IFLNK S_IFREG = unix.S_IFREG S_IFSOCK = unix.S_IFSOCK S_ISGID = unix.S_ISGID S_ISUID = unix.S_ISUID S_ISVTX = unix.S_ISVTX EACCES = unix.EACCES EBADF = unix.EBADF EINVAL = unix.EINVAL EIO = unix.EIO EISDIR = unix.EISDIR ENODATA = unix.ENODATA ENOENT = unix.ENOENT ENOSYS = unix.ENOSYS ENOTDIR = unix.ENOTDIR ENOTSUP = unix.ENOTSUP EROFS = unix.EROFS DT_UNKNOWN = 0 DT_FIFO = S_IFIFO >> 12 DT_CHR = S_IFCHR >> 12 DT_DIR = S_IFDIR >> 12 DT_BLK = S_IFBLK >> 12 DT_REG = S_IFREG >> 12 DT_LNK = S_IFLNK >> 12 DT_SOCK = S_IFSOCK >> 12 AT_SYMLINK_NOFOLLOW = 0x100 )
Variables ¶
View Source
var Hbo = binary.LittleEndian
Functions ¶
func FileStatToUnixMode ¶
func Makedev ¶
Supports basic makedev implementation. Most kernels support major/minors larger than 255 however how this is encoded varies between kernels therefore we only support 8 bit major/minors which is consistently represented.
func RetrySyscall6 ¶
Invoke a syscall that returns an int and an error, retrying on EINTR
func RetrySyscallE ¶
Invoke a syscall that returns just an error, retrying on EINTR
func RetrySyscallIE ¶
Invoke a syscall that returns an int and an error, retrying on EINTR
func TestAccess ¶
func UnixToFileStatMode ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.