pathsysinfo

package
v0.7.8 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2022 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ChownCopy added in v0.4.4

func ChownCopy(srcFullPath, dstFullPath string) *errorwrapper.Wrapper

func ChownCopyUnix added in v0.4.7

func ChownCopyUnix(srcFullPath, dstFullPath string) *errorwrapper.Wrapper

func ChownCopyUsing added in v0.4.4

func ChownCopyUsing(
	srcFullPath *fileinfopath.Instance,
	dstFullPath string,
) *errorwrapper.Wrapper

func GetGroupId

func GetGroupId(groupObj *user.Group) (int, *errorwrapper.Wrapper)

func LookupGroup

func LookupGroup(groupName string) (*user.Group, *errorwrapper.Wrapper)

func LookupUser

func LookupUser(userName string) (userResult *user.User, errorWrapper *errorwrapper.Wrapper)

func SystemUserId

func SystemUserId(userResult *user.User) (int, *errorwrapper.Wrapper)

Types

type GroupInfo

type GroupInfo struct {
	*user.Group
	Id           int
	IsValidGroup bool
	HasValidId   bool
	ErrorWrapper *errorwrapper.Wrapper
}

func GetGroupInfo

func GetGroupInfo(groupName string) *GroupInfo

func InvalidGroupInfo

func InvalidGroupInfo(errorWrapper *errorwrapper.Wrapper) *GroupInfo

func (GroupInfo) String

func (it GroupInfo) String() string

type PathUserGroupId added in v0.4.4

type PathUserGroupId struct {
	FileInfoWithPath *fileinfopath.Instance
	UserId, GroupId  int
	Error            error
}

func GetPathUserGroupId added in v0.4.4

func GetPathUserGroupId(filePath string) *PathUserGroupId

func GetPathUserGroupIdUsing added in v0.4.4

func GetPathUserGroupIdUsing(instance *fileinfopath.Instance) *PathUserGroupId

func (*PathUserGroupId) ApplyChown added in v0.4.4

func (it *PathUserGroupId) ApplyChown(fullPath string) *errorwrapper.Wrapper

func (*PathUserGroupId) ApplyGroupId added in v0.4.4

func (it *PathUserGroupId) ApplyGroupId(fullPath string) *errorwrapper.Wrapper

func (*PathUserGroupId) ApplyUserId added in v0.4.4

func (it *PathUserGroupId) ApplyUserId(fullPath string) *errorwrapper.Wrapper

func (*PathUserGroupId) ErrorWrapper added in v0.4.4

func (it *PathUserGroupId) ErrorWrapper() *errorwrapper.Wrapper

func (*PathUserGroupId) HasError added in v0.4.4

func (it *PathUserGroupId) HasError() bool

func (*PathUserGroupId) HasValidGroupId added in v0.4.4

func (it *PathUserGroupId) HasValidGroupId() bool

func (*PathUserGroupId) HasValidUserAndGroupId added in v0.4.4

func (it *PathUserGroupId) HasValidUserAndGroupId() bool

func (*PathUserGroupId) HasValidUserId added in v0.4.4

func (it *PathUserGroupId) HasValidUserId() bool

func (*PathUserGroupId) InvalidError added in v0.4.4

func (it *PathUserGroupId) InvalidError() *errorwrapper.Wrapper

func (*PathUserGroupId) IsEmptyError added in v0.4.4

func (it *PathUserGroupId) IsEmptyError() bool

func (*PathUserGroupId) IsEqual added in v0.5.2

func (it *PathUserGroupId) IsEqual(
	isQuickVerifyOnPathEqual,
	isPathMustMatchIfDir,
	isVerifyContent bool,
	right *PathUserGroupId,
) bool

func (*PathUserGroupId) IsEqualDefault added in v0.5.2

func (it *PathUserGroupId) IsEqualDefault(
	right *PathUserGroupId,
) bool

func (*PathUserGroupId) IsInvalidUserOrGroupId added in v0.4.4

func (it *PathUserGroupId) IsInvalidUserOrGroupId() bool

func (*PathUserGroupId) UserGroupId added in v0.5.2

func (it *PathUserGroupId) UserGroupId() *UserGroupId

type UserGroupId added in v0.5.2

type UserGroupId struct {
	UserId, GroupId int
	Error           string
}

func GetUserGroupId added in v0.5.2

func GetUserGroupId(filePath string) *UserGroupId

func GetUserGroupIdUsing added in v0.5.2

func GetUserGroupIdUsing(fileInfoWithPath *fileinfopath.Instance) *UserGroupId

func GetUserGroupIdUsingUnix added in v0.5.2

func GetUserGroupIdUsingUnix(fileInfoWithPath *fileinfopath.Instance) *UserGroupId

func (*UserGroupId) ApplyChown added in v0.5.2

func (it *UserGroupId) ApplyChown(fullPath string) *errorwrapper.Wrapper

func (*UserGroupId) ApplyGroupId added in v0.5.2

func (it *UserGroupId) ApplyGroupId(fullPath string) *errorwrapper.Wrapper

func (*UserGroupId) ApplyUserId added in v0.5.2

func (it *UserGroupId) ApplyUserId(fullPath string) *errorwrapper.Wrapper

func (*UserGroupId) ErrorWrapper added in v0.5.2

func (it *UserGroupId) ErrorWrapper(fullPath string) *errorwrapper.Wrapper

func (*UserGroupId) HasError added in v0.5.2

func (it *UserGroupId) HasError() bool

func (*UserGroupId) HasValidGroupId added in v0.5.2

func (it *UserGroupId) HasValidGroupId() bool

func (*UserGroupId) HasValidUserAndGroupId added in v0.5.2

func (it *UserGroupId) HasValidUserAndGroupId() bool

func (*UserGroupId) HasValidUserId added in v0.5.2

func (it *UserGroupId) HasValidUserId() bool

func (*UserGroupId) InvalidError added in v0.5.2

func (it *UserGroupId) InvalidError(fullPath string) *errorwrapper.Wrapper

func (*UserGroupId) IsEmptyError added in v0.5.2

func (it *UserGroupId) IsEmptyError() bool

func (*UserGroupId) IsEqual added in v0.5.2

func (it *UserGroupId) IsEqual(right *UserGroupId) bool

func (*UserGroupId) IsInvalidUserOrGroupId added in v0.5.2

func (it *UserGroupId) IsInvalidUserOrGroupId() bool

func (*UserGroupId) String added in v0.5.2

func (it *UserGroupId) String() string

type UserInfo

type UserInfo struct {
	*user.User
	Id           int
	IsValidUser  bool
	HasValidId   bool
	ErrorWrapper *errorwrapper.Wrapper
}

func GetUserInfo

func GetUserInfo(userName string) *UserInfo

func InvalidUserInfo

func InvalidUserInfo(errorWrapper *errorwrapper.Wrapper) *UserInfo

func (*UserInfo) String

func (it *UserInfo) String() string

Jump to

Keyboard shortcuts

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