pathstatlinux

package
v0.2.8 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2021 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Group

type Group struct {
	IntIdNameValidation
	// contains filtered or unexported fields
}

func InvalidGroup

func InvalidGroup() *Group

func (*Group) SystemGroup

func (g *Group) SystemGroup() *pathsysinfo.GroupInfo

type Info

type Info struct {
	User
	Group
	RawLocationTimestamp
	RwxSimple
	Location       string
	IsDirectory    bool
	IsPathExist    bool
	IsValidParsing bool
	ErrorWrapper   *errorwrapper.Wrapper
	FileInfo       os.FileInfo // could be nil
}

func Get

func Get(location string) *Info

func InvalidInfo

func InvalidInfo(location string) *Info

func InvalidInfoUsingErr

func InvalidInfoUsingErr(location string, errWrapper *errorwrapper.Wrapper) *Info

func ProcessLinesToInfo

func ProcessLinesToInfo(
	lines []string,
	filePath string,
	errorWrapper *errorwrapper.Wrapper,
) *Info
ProcessLinesToInfo processLinesToInfo

➜ ~ stat /etc/mysql

File: /etc/mysql
Size: 4096            Blocks: 8          IO Block: 4096   directory
Device: 10302h/66306d   Inode: 6293381     Links: 4
Access: (0755/drwxr-xr-x)  Uid: (    0/    root)   Gid: (    0/    root)
Access: 2021-06-03 09:18:30.014302041 +0000
Modify: 2021-06-03 09:18:32.086923601 +0000
Change: 2021-06-03 09:18:32.086923601 +0000

func (*Info) HandleError

func (receiver *Info) HandleError()

func (*Info) HandleErrorWithMessage

func (receiver *Info) HandleErrorWithMessage(message string)

func (*Info) HasError

func (receiver *Info) HasError() bool

func (*Info) IsEmptyError

func (receiver *Info) IsEmptyError() bool

func (*Info) IsSafe

func (receiver *Info) IsSafe() bool

type IntIdNameValidation

type IntIdNameValidation struct {
	Id         int
	Name       string
	HasValidId bool
}

func InvalidIntIdNameValidation

func InvalidIntIdNameValidation() *IntIdNameValidation

type RawLocationTimestamp

type RawLocationTimestamp struct {
	Access, Modify, Change string
}

type RwxSimple

type RwxSimple struct {
	HyphenedRwxValue string
	RwxWrapper       *chmodhelper.RwxWrapper
	ErrorWrapper     *errorwrapper.Wrapper
	IsRwxValid       bool
}

func InvalidRwxSimple

func InvalidRwxSimple() *RwxSimple

type User

type User struct {
	IntIdNameValidation
	// contains filtered or unexported fields
}

func InvalidUser

func InvalidUser() *User

func (*User) SystemUser

func (u *User) SystemUser() *pathsysinfo.UserInfo

Jump to

Keyboard shortcuts

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