Documentation ¶
Overview ¶
Credits to :
- Dániel Görbe <https://github.com/g0rbe>
- Canonical Ltd. <https://github.com/snapcore/snapd/blob/8fcab0dd4e20e28fc68f129e6680b17bff70a37c/osutil/chattr.go>
Index ¶
- Constants
- Variables
- func AskConfirmation(s string) bool
- func CurrentUser() string
- func EnterDefault(verbose bool, on_persistent bool) error
- func EnterRo(verbose bool) error
- func EnterRw(verbose bool) error
- func Get(key string) (string, error)
- func GetAttrs(f *os.File) (int32, error)
- func GetImmutableFlag(path string) int
- func IsAttr(f *os.File, attr int32) (bool, error)
- func LegacySetAttr(path string, attr string) error
- func LegacyUnsetAttr(path string, attr string) error
- func Load() error
- func OfflineUpdate() error
- func OverlayAdd(path string, force bool, verbose bool) error
- func OverlayList() map[string]string
- func OverlayRemove(path string, keep bool, verbose bool) error
- func PackageKitUpdatePrepared() bool
- func PackageKitUpgradePrepared() bool
- func RootCheck(display bool) bool
- func Set(key, value string) error
- func SetAttr(f *os.File, attr int32) error
- func SetImmutableFlag(path string, verbose bool, state int, ifDiff bool) error
- func Show() error
- func StateEmptyTrash() error
- func StateList() ([]string, []string, error)
- func StateMountUnitRegenerate() error
- func StateNew() error
- func StateNextId() string
- func StateRollback(id string) error
- func StateStatus() error
- func StateTrash(id string) error
- func UnsetAttr(f *os.File, attr int32) error
Constants ¶
View Source
const ( // from /usr/include/linux/fs.h FS_SECRM_FL = 0x00000001 /* Secure deletion */ FS_UNRM_FL = 0x00000002 /* Undelete */ FS_COMPR_FL = 0x00000004 /* Compress file */ FS_SYNC_FL = 0x00000008 /* Synchronous updates */ FS_IMMUTABLE_FL = 0x00000010 /* Immutable file */ FS_APPEND_FL = 0x00000020 /* writes to file may only append */ FS_NODUMP_FL = 0x00000040 /* do not dump file */ FS_NOATIME_FL = 0x00000080 /* do not update atime */ FS_DIRTY_FL = 0x00000100 FS_COMPRBLK_FL = 0x00000200 /* One or more compressed clusters */ FS_NOCOMP_FL = 0x00000400 /* Don't compress */ FS_ENCRYPT_FL = 0x00000800 /* Encrypted file */ FS_BTREE_FL = 0x00001000 /* btree format dir */ FS_INDEX_FL = 0x00001000 /* hash-indexed directory */ FS_IMAGIC_FL = 0x00002000 /* AFS directory */ FS_JOURNAL_DATA_FL = 0x00004000 /* Reserved for ext3 */ FS_NOTAIL_FL = 0x00008000 /* file tail should not be merged */ FS_DIRSYNC_FL = 0x00010000 /* dirsync behaviour (directories only) */ FS_TOPDIR_FL = 0x00020000 /* Top of directory hierarchies*/ FS_HUGE_FILE_FL = 0x00040000 /* Reserved for ext4 */ FS_EXTENT_FL = 0x00080000 /* Extents */ FS_EA_INODE_FL = 0x00200000 /* Inode used for large EA */ FS_EOFBLOCKS_FL = 0x00400000 /* Reserved for ext4 */ FS_NOCOW_FL = 0x00800000 /* Do not cow file */ FS_INLINE_DATA_FL = 0x10000000 /* Reserved for ext4 */ FS_PROJINHERIT_FL = 0x20000000 /* Create with parents projid */ FS_RESERVED_FL = 0x80000000 /* reserved for ext2 lib */ )
File attributes.
View Source
const ( // from ioctl_list manpage FS_IOC_GETFLAGS uintptr = 0x80086601 FS_IOC_SETFLAGS uintptr = 0x40086602 )
Request flags.
View Source
const ( DBUS_NAME = "org.freedesktop.PackageKit" DBUS_PATH = "/org/freedesktop/PackageKit" DBUS_OFFLINE_INTERFACE = "org.freedesktop.PackageKit.Offline" )
Variables ¶
View Source
var ( Config = "/etc/almost.ini" Section = "Almost" Defaults = map[string]interface{}{ "Almost::CurrentMode": "0", "Almost::DefaultMode": "0", "Almost::PersistModeStatus": "0", } )
Functions ¶
func AskConfirmation ¶
func CurrentUser ¶
func CurrentUser() string
func EnterDefault ¶
func GetImmutableFlag ¶
func LegacySetAttr ¶
Legacy functions using the chattr utility.
func LegacyUnsetAttr ¶
func OfflineUpdate ¶
func OfflineUpdate() error
func OverlayList ¶
func PackageKitUpdatePrepared ¶
func PackageKitUpdatePrepared() bool
func PackageKitUpgradePrepared ¶
func PackageKitUpgradePrepared() bool
func SetImmutableFlag ¶
func StateEmptyTrash ¶
func StateEmptyTrash() error
func StateMountUnitRegenerate ¶
func StateMountUnitRegenerate() error
func StateNextId ¶
func StateNextId() string
func StateRollback ¶
func StateStatus ¶
func StateStatus() error
func StateTrash ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.