Help us shape the future of Go! Take the 2026 Go Developer Survey

xattr

package module
v1.0.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 18, 2019 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// FsIocGetFlags is FS_IOC_GETFLAGS from /usr/include/linux/fs.h (man ioctl_list)
	FsIocGetFlags = 0x80086601
	// FsIocSetFlags is FS_IOC_SETFLAGS from /usr/include/linux/fs.h (man ioctl_list)
	FsIocSetFlags = 0x40086602

	// FsImmutableFlag is FS_IMMUTABLE_FL from /usr/include/linux/fs.h
	FsImmutableFlag = 0x00000010 /* Immutable file */
	// FsAppendFlag is FS_APPEND_FL from /usr/include/linux/fs.h
	FsAppendFlag = 0x00000020 /* writes to file may only append */
	// FsNoDumpFlag is FS_NODUMP_FL from /usr/include/linux/fs.h
	FsNoDumpFlag = 0x00000040 /* do not dump file */
)

ToDo: Test on XFS

Variables

This section is empty.

Functions

func GetAttr

func GetAttr(fd *os.File) (int, error)

GetAttr retrieves the attributes of a file on a linux filesystem.

func GetAttrFd

func GetAttrFd(fd int) (int, error)

GetAttrFd retrieves the attributes of a file on a linux filesystem, using file descriptor as int directly.

func GetAttrFdPtr

func GetAttrFdPtr(fd uintptr) (int, error)

GetAttrFdPtr retrieves the attributes of a file on a linux filesystem, using file descriptor as uintptr directly.

func IsAppendOnly

func IsAppendOnly(fd *os.File) bool

IsAppendOnly checks if file has append only flag set.

func IsAppendOnlyFd

func IsAppendOnlyFd(fd int) bool

IsAppendOnlyFd checks if file has append only flag set, using file descriptor as int directly.

func IsAppendOnlyFdPtr

func IsAppendOnlyFdPtr(fd uintptr) bool

IsAppendOnlyFdPtr checks if file has append only flag set, using file descriptor as uintptr directly.

func IsImmutable

func IsImmutable(fd *os.File) bool

IsImmutable checks if file has immutable flag set.

func IsImmutableFd

func IsImmutableFd(fd int) bool

IsImmutableFd checks if file has immutable flag set, using file descriptor as int directly.

func IsImmutableFdPtr

func IsImmutableFdPtr(fd uintptr) bool

IsImmutableFdPtr checks if file has immutable flag set, using file descriptor as uintptr directly.

func IsNoDump

func IsNoDump(fd *os.File) bool

IsNoDump checks if file has no dump flag set.

func IsNoDumpFd

func IsNoDumpFd(fd int) bool

IsNoDumpFd checks if file has no dump flag set, using file descriptor as int directly.

func IsNoDumpFdPtr

func IsNoDumpFdPtr(fd uintptr) bool

IsNoDumpFdPtr checks if file has no dump flag set, using file descriptor as uintptr directly.

func SetAppendOnly

func SetAppendOnly(fd *os.File) error

SetAppendOnly sets append only flag on file.

func SetAppendOnlyFd

func SetAppendOnlyFd(fd int) error

SetAppendOnlyFd sets append only flag on file, using file descriptor as int directly.

func SetAppendOnlyFdPtr

func SetAppendOnlyFdPtr(fd uintptr) error

SetAppendOnlyFdPtr sets append only flag on file, using file descriptor as uintptr directly.

func SetAttr

func SetAttr(fd *os.File, attr int) error

SetAttr sets the attributes of a file on a linux filesystem to the given value.

func SetAttrFd

func SetAttrFd(fd int, attr int) error

SetAttrFd sets the attributes of a file on a linux filesystem to the given value, using file descriptor as uintptr directly.

func SetAttrFdPtr

func SetAttrFdPtr(fd uintptr, attr int) error

SetAttrFdPtr sets the attributes of a file on a linux filesystem to the given value, using file descriptor as uintptr directly.

func SetImmutable

func SetImmutable(fd *os.File) error

SetImmutable sets immutable flag on file.

func SetImmutableFd

func SetImmutableFd(fd int) error

SetImmutableFd sets immutable flag on file, using file descriptor as int directly.

func SetImmutableFdPtr

func SetImmutableFdPtr(fd uintptr) error

SetImmutableFdPtr sets immutable flag on file, using file descriptor as uintptr directly.

func SetNoDump

func SetNoDump(fd *os.File) error

SetNoDump sets no dump flag on file.

func SetNoDumpFd

func SetNoDumpFd(fd int) error

SetNoDumpFd sets no dump flag on file, using file descriptor as int directly.

func SetNoDumpFdPtr

func SetNoDumpFdPtr(fd uintptr) error

SetNoDumpFdPtr sets no dump flag on file, using file descriptor as uintptr directly.

func UnSetAppendOnly

func UnSetAppendOnly(fd *os.File) error

UnSetAppendOnly unsets append only flag on file.

func UnSetAppendOnlyFd

func UnSetAppendOnlyFd(fd int) error

UnSetAppendOnlyFd unsets append only flag on file, using file descriptor as int directly.

func UnSetAppendOnlyFdPtr

func UnSetAppendOnlyFdPtr(fd uintptr) error

UnSetAppendOnlyFdPtr unsets append only flag on file, using file descriptor as uintptr directly.

func UnSetImmutable

func UnSetImmutable(fd *os.File) error

UnSetImmutable unsets immutable flag on file.

func UnSetImmutableFd

func UnSetImmutableFd(fd int) error

UnSetImmutableFd unsets immutable flag on file, using file descriptor as int directly.

func UnSetImmutableFdPtr

func UnSetImmutableFdPtr(fd uintptr) error

UnSetImmutableFdPtr unsets immutable flag on file, using file descriptor as uintptr directly.

func UnSetNoDump

func UnSetNoDump(fd *os.File) error

UnSetNoDump unsets no dump flag on file.

func UnSetNoDumpFd

func UnSetNoDumpFd(fd int) error

UnSetNoDumpFd unsets no dump flag on file, using file descriptor as int directly.

func UnSetNoDumpFdPtr

func UnSetNoDumpFdPtr(fd uintptr) error

UnSetNoDumpFdPtr unsets no dump flag on file, using file descriptor as uintptr directly.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL