Documentation
¶
Index ¶
- func Fix(isExpand bool, path string) string
- func FixIf(isNormalize, isExpand bool, path string) string
- func FixMany(isExpand bool, paths ...string) []string
- type Location
- func (it *Location) ClonePath() *Location
- func (it *Location) CompiledPath() string
- func (it *Location) ExistStat() *chmodhelper.PathExistStat
- func (it *Location) FileInfo() os.FileInfo
- func (it *Location) FileMode() os.FileMode
- func (it *Location) HasPath() bool
- func (it *Location) IsDir() bool
- func (it *Location) IsEmptyPath() bool
- func (it *Location) IsEqual(another *Location) bool
- func (it *Location) IsEqualWithoutOptions(another *Location) bool
- func (it *Location) IsExistButDir() bool
- func (it *Location) IsExistButFile() bool
- func (it *Location) IsFile() bool
- func (it *Location) IsInvalid() bool
- func (it *Location) IsInvalidPath() bool
- func (it *Location) IsPathExist() bool
- func (it *Location) SafeFileMode() os.FileMode
- type PathOptions
- func (it *PathOptions) ClonePathOptions() *PathOptions
- func (it *PathOptions) GetFixedPath(location string) string
- func (it *PathOptions) GetFixedPathJoined(location1, location2 string) string
- func (it *PathOptions) GetFixedPathJoinedMany(locations ...string) string
- func (it *PathOptions) IsEqual(another *PathOptions) bool
- func (it *PathOptions) Join(location1, location2 string) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Location ¶
type Location struct { PathOptions Path string `json:"Location,omitempty"` // empty path will be ignored from applying, must use CompiledPath // contains filtered or unexported fields }
Location Don't use Path Directly but use CompiledPath
func NewLocation ¶ added in v0.2.8
func NewLocationUsingOptions ¶ added in v0.2.8
func NewLocationUsingOptions( location string, options PathOptions, ) *Location
func (*Location) CompiledPath ¶
func (*Location) ExistStat ¶ added in v0.3.8
func (it *Location) ExistStat() *chmodhelper.PathExistStat
func (*Location) IsEmptyPath ¶
func (*Location) IsEqualWithoutOptions ¶ added in v0.3.5
func (*Location) IsExistButDir ¶ added in v0.3.8
func (*Location) IsExistButFile ¶ added in v0.3.8
func (*Location) IsInvalidPath ¶ added in v0.3.8
func (*Location) IsPathExist ¶
IsPathExist returns true if exist on the file system
func (*Location) SafeFileMode ¶ added in v0.3.8
type PathOptions ¶
type PathOptions struct { IsContinueOnError bool `json:"IsContinueOnError,omitempty"` IsNormalize bool `json:"IsNormalize,omitempty"` IsExpandEnvVar bool `json:"IsExpandEnvVariable,omitempty"` // can expand environment variables with %{Name} $Name %{Java_home} ${Java_HOME} IsRecursive bool `json:"IsRecursive,omitempty"` IsSkipOnInvalid bool `json:"IsSkipOnInvalid,omitempty"` IsSkipOnExist bool `json:"IsSkipOnExist,omitempty"` IsSkipOnEmpty bool `json:"IsSkipOnEmpty,omitempty"` IsRelative bool `json:"IsRelative,omitempty"` }
func (*PathOptions) ClonePathOptions ¶
func (it *PathOptions) ClonePathOptions() *PathOptions
func (*PathOptions) GetFixedPath ¶
func (it *PathOptions) GetFixedPath(location string) string
func (*PathOptions) GetFixedPathJoined ¶
func (it *PathOptions) GetFixedPathJoined(location1, location2 string) string
func (*PathOptions) GetFixedPathJoinedMany ¶
func (it *PathOptions) GetFixedPathJoinedMany( locations ...string, ) string
func (*PathOptions) IsEqual ¶ added in v0.3.5
func (it *PathOptions) IsEqual(another *PathOptions) bool
func (*PathOptions) Join ¶ added in v0.3.5
func (it *PathOptions) Join(location1, location2 string) string
Click to show internal directories.
Click to hide internal directories.