Documentation ¶
Index ¶
- func Dup3(oldfd int, newfd int, flags int) (err error)
- func EnospcPrealloc(fd int, off int64, len int64) error
- func Faccessat(dirfd int, path string, mode uint32) error
- func Fallocate(fd int, mode uint32, off int64, len int64) error
- func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error)
- func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error)
- func Fstatat(dirfd int, path string, stat *unix.Stat_t, flags int) (err error)
- func Getdents(fd int) ([]fuse.DirEntry, error)
- func Linkat(olddirfd int, oldpath string, newdirfd int, newpath string, flags int) (err error)
- func Mkdirat(dirfd int, path string, mode uint32) (err error)
- func Mknodat(dirfd int, path string, mode uint32, dev int) (err error)
- func OpenNofollow(baseDir string, relPath string, flags int, mode uint32) (fd int, err error)
- func Openat(dirfd int, path string, flags int, mode uint32) (fd int, err error)
- func Readlinkat(dirfd int, path string) (string, error)
- func Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error)
- func Symlinkat(oldpath string, newdirfd int, newpath string) (err error)
- func Unix2syscall(u unix.Stat_t) syscall.Stat_t
- func Unlinkat(dirfd int, path string, flags int) (err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EnospcPrealloc ¶
Sorry, fallocate is not available on OSX at all and fcntl F_PREALLOCATE is not accessible from Go. See https://github.com/rfjakob/gocryptfs/issues/18 if you want to help.
func Faccessat ¶ added in v1.4.3
Faccessat exists both in Linux and in MacOS 10.10+, but the Linux version DOES NOT support any flags. Emulate AT_SYMLINK_NOFOLLOW like glibc does.
func OpenNofollow ¶ added in v1.4.3
OpenNofollow opens the file/dir at "relPath" in a way that is secure against symlink attacks. Symlinks that are part of "relPath" are never followed. This function is implemented by walking the directory tree, starting at "baseDir", using the Openat syscall with the O_NOFOLLOW flag. Symlinks that are part of the "baseDir" path are followed.
func Readlinkat ¶ added in v1.4.3
Readlinkat exists both in Linux and in MacOS 10.10+. We may add an emulated version for users on older MacOS versions if there is demand. Buffer allocation is handled internally, unlike the bare unix.Readlinkat.
func Unix2syscall ¶ added in v1.4.3
Unix2syscall converts a unix.Stat_t struct to a syscall.Stat_t struct.
Types ¶
This section is empty.