pathsysinfo

package
v0.4.9 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2021 License: MIT Imports: 11 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 (receiver *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) IsInvalidUserOrGroupId added in v0.4.4

func (it *PathUserGroupId) IsInvalidUserOrGroupId() bool

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 (receiver *UserInfo) String() string

Jump to

Keyboard shortcuts

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