pathfixer

package
v0.2.9 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Location

type Location struct {
	PathOptions
	Path string `json:"Location,omitempty"` // empty path will be ignored from applying.
	// contains filtered or unexported fields
}

func NewLocation added in v0.2.8

func NewLocation(location string) *Location

func NewLocationUsingOptions added in v0.2.8

func NewLocationUsingOptions(
	location string,
	options PathOptions,
) *Location

func (*Location) ClonePath

func (it *Location) ClonePath() *Location

func (*Location) CompiledPath

func (it *Location) CompiledPath() string

func (*Location) HasPath

func (it *Location) HasPath() bool

func (*Location) IsEmptyPath

func (it *Location) IsEmptyPath() bool

func (*Location) IsPathExist

func (it *Location) IsPathExist() bool

IsPathExist returns true if exist on the file system

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

Jump to

Keyboard shortcuts

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