chattr

package
v3.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2026 License: BSD-3-Clause Imports: 3 Imported by: 0

Documentation

Overview

Package chattr https://github.com/g0rbe/go-chattr/pull/3

Index

Constants

View Source
const (
	FS_SECRM_FL        uint32 = 0x00000001 /* Secure deletion */
	FS_UNRM_FL         uint32 = 0x00000002 /* Undelete */
	FS_COMPR_FL        uint32 = 0x00000004 /* Compress file */
	FS_SYNC_FL         uint32 = 0x00000008 /* Synchronous updates */
	FS_IMMUTABLE_FL    uint32 = 0x00000010 /* Immutable file */
	FS_APPEND_FL       uint32 = 0x00000020 /* writes to file may only append */
	FS_NODUMP_FL       uint32 = 0x00000040 /* do not dump file */
	FS_NOATIME_FL      uint32 = 0x00000080 /* do not update atime */
	FS_DIRTY_FL        uint32 = 0x00000100
	FS_COMPRBLK_FL     uint32 = 0x00000200 /* One or more compressed clusters */
	FS_NOCOMP_FL       uint32 = 0x00000400 /* Don't compress */
	FS_ENCRYPT_FL      uint32 = 0x00000800 /* Encrypted file */
	FS_BTREE_FL        uint32 = 0x00001000 /* btree format dir */
	FS_INDEX_FL        uint32 = 0x00001000 /* hash-indexed directory */
	FS_IMAGIC_FL       uint32 = 0x00002000 /* AFS directory */
	FS_JOURNAL_DATA_FL uint32 = 0x00004000 /* Reserved for ext3 */
	FS_NOTAIL_FL       uint32 = 0x00008000 /* file tail should not be merged */
	FS_DIRSYNC_FL      uint32 = 0x00010000 /* dirsync behaviour (directories only) */
	FS_TOPDIR_FL       uint32 = 0x00020000 /* Top of directory hierarchies*/
	FS_HUGE_FILE_FL    uint32 = 0x00040000 /* Reserved for ext4 */
	FS_EXTENT_FL       uint32 = 0x00080000 /* Extents */
	FS_EA_INODE_FL     uint32 = 0x00200000 /* Inode used for large EA */
	FS_EOFBLOCKS_FL    uint32 = 0x00400000 /* Reserved for ext4 */
	FS_NOCOW_FL        uint32 = 0x00800000 /* Do not cow file */
	FS_INLINE_DATA_FL  uint32 = 0x10000000 /* Reserved for ext4 */
	FS_PROJINHERIT_FL  uint32 = 0x20000000 /* Create with parents projid */
	FS_RESERVED_FL     uint32 = 0x80000000 /* reserved for ext2 lib */
)

from /usr/include/linux/fs.h

View Source
const (
	FS_IOC_GETFLAGS uintptr = 0x80086601
	FS_IOC_SETFLAGS uintptr = 0x40086602
)

from ioctl_list manpage

Variables

This section is empty.

Functions

func GetAttrs

func GetAttrs(f *os.File) (uint32, error)

GetAttrs retrieves the attributes of a file.

func IsAttr

func IsAttr(f *os.File, attr uint32) (bool, error)

IsAttr checks whether the given attribute is set.

func SetAttr

func SetAttr(f *os.File, attr uint32) error

SetAttr sets the given attribute.

func UnsetAttr

func UnsetAttr(f *os.File, attr uint32) error

UnsetAttr unsets the given attribute.

Types

This section is empty.

Jump to

Keyboard shortcuts

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