pathjoin

package
v0.3.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FixPath added in v0.2.7

func FixPath(
	isNormalizePlusLogPathFix,
	isExpand bool,
	location string,
) string

FixPath normalized or expand or both apply based on condition

func Fixed added in v0.2.8

func Fixed(
	baseDir string,
	paths ...string,
) string

Fixed

Paths are applied with normalize, skip on empty path given

func Fixed2 added in v0.2.8

func Fixed2(
	path1,
	path2 string,
) string

func Fixed3 added in v0.2.8

func Fixed3(
	path1,
	path2,
	path3 string,
) string

func FixedIf added in v0.2.8

func FixedIf(
	isFixed bool,
	baseDir string,
	paths ...string,
) string

FixedIf

isNormalizePlusLongPathFix if true then for windows add UNC Location fix

func Join

func Join(path1, path2 string, isNormalizePlusLongPathFix bool) string

Join isNormalizePlusLongPathFix if true then for windows add UNC Location fix

func JoinBaseDirWithSep added in v0.2.5

func JoinBaseDirWithSep(
	isSkipEmpty,
	isExpandEnvVariables,
	isNormalizePlusLongPathFix bool,
	sep string,
	baseDir string,
	paths ...string,
) string

JoinBaseDirWithSep isNormalizePlusLongPathFix if true then for windows add UNC Location fix

Omits baseDir if not given

func JoinConditionalNormalized3ExpandIf added in v0.2.7

func JoinConditionalNormalized3ExpandIf(
	isNormalizePlusLongPathFix,
	isExpand bool,
	path1, path2, path3 string,
) string

JoinConditionalNormalized3ExpandIf normalized or expand or both apply based on condition

func JoinConditionalNormalizedExpandIf added in v0.2.6

func JoinConditionalNormalizedExpandIf(
	isNormalizePlusLongPathFix,
	isExpand bool,
	path1, path2 string,
) string

JoinConditionalNormalizedExpandIf normalized or expand or both apply based on condition

func JoinNormalized

func JoinNormalized(
	path1, path2 string,
) string

JoinNormalized normalized applied auto

func JoinNormalized3

func JoinNormalized3(path1, path2, path3 string) string

JoinNormalized3 normalized applied auto

func JoinNormalized3ExpandIf added in v0.2.5

func JoinNormalized3ExpandIf(
	isExpandNormalize bool,
	path1, path2, path3 string,
) string

JoinNormalized3ExpandIf normalized and expand applied if condition meets

func JoinNormalized3If added in v0.1.2

func JoinNormalized3If(
	isNormalize bool,
	path1, path2, path3 string,
) string

JoinNormalized3If normalized applied auto

func JoinNormalizedExpand added in v0.2.5

func JoinNormalizedExpand(
	path1, path2 string,
) string

JoinNormalizedExpand normalized and expand applied auto

func JoinNormalizedExpand3 added in v0.2.5

func JoinNormalizedExpand3(
	path1, path2, path3 string,
) string

JoinNormalizedExpand3 normalized and expand applied auto

func JoinNormalizedExpandIf added in v0.2.5

func JoinNormalizedExpandIf(
	isExpandNormalize bool, path1, path2 string,
) string

JoinNormalizedExpandIf normalized and expand applied if condition meets

func JoinNormalizedIf added in v0.1.2

func JoinNormalizedIf(isNormalize bool, path1, path2 string) string

JoinNormalizedIf normalized applied auto

func JoinSimple

func JoinSimple(path1, path2 string) string

JoinSimple doesn't apply normalize

func JoinSimple3

func JoinSimple3(path1, path2, path3 string) string

JoinSimple3 Doesn't apply normalize

func JoinSimple3ConditionalNonEmpty added in v0.2.7

func JoinSimple3ConditionalNonEmpty(
	path1,
	path2,
	path3 string,
) string

JoinSimple3ConditionalNonEmpty Doesn't apply normalize or doesn't join if empty

func JoinSimpleConditionalNonEmpty added in v0.2.7

func JoinSimpleConditionalNonEmpty(
	path1,
	path2 string,
) string

JoinSimpleConditionalNonEmpty Doesn't apply normalize or doesn't join if empty

func JoinWithSep

func JoinWithSep(
	isSkipEmpty,
	isExpandEnvVariables,
	isNormalizePlusLongPathFix bool,
	sep string,
	paths ...string,
) string

JoinWithSep isNormalizePlusLongPathFix if true then for windows add UNC Location fix

func JoinsNormalizedExpandIf added in v0.2.5

func JoinsNormalizedExpandIf(
	isExpandNormalize bool,
	baseDir string,
	relatives ...string,
) string

JoinsNormalizedExpandIf normalized and expand applied if condition meets

func JoinsNormalizedIf added in v0.2.5

func JoinsNormalizedIf(
	isNormalize bool,
	baseDir string,
	relatives ...string,
) string

JoinsNormalizedIf normalized and expand applied if condition meets

func WithRoot added in v0.2.8

func WithRoot(paths ...string) string

func WithTemp added in v0.2.7

func WithTemp(
	locations ...string,
) string

func WithTempPlus added in v0.2.7

func WithTempPlus(
	isNormalize,
	isExpand bool,
	baseDir string,
	locations ...string,
) string

func WithTempPlusDefaults added in v0.2.7

func WithTempPlusDefaults(
	baseDir string,
	locations ...string,
) string

func WithTempTest added in v0.2.8

func WithTempTest(paths ...string) string

Types

type Joiner

type Joiner struct {
	// contains filtered or unexported fields
}

func EmptyJoiner

func EmptyJoiner() *Joiner

func NewJoiner

func NewJoiner(capacity int) *Joiner

func NewJoiner5

func NewJoiner5() *Joiner

func (*Joiner) Add

func (it *Joiner) Add(addingPath string) *Joiner

func (*Joiner) Adds

func (it *Joiner) Adds(addingPaths ...string) *Joiner

func (*Joiner) HasItems

func (it *Joiner) HasItems() bool

func (*Joiner) IsEmpty

func (it *Joiner) IsEmpty() bool

func (*Joiner) Length

func (it *Joiner) Length() int

func (*Joiner) OsSeparatorJoin added in v0.2.5

func (it *Joiner) OsSeparatorJoin(
	isExpandEnvVars,
	isNormalizePlusLongPathFix bool,
) string

OsSeparatorJoin

Usages osconsts.PathSeparator as separator

func (*Joiner) OsSeparatorJoinExpand added in v0.2.5

func (it *Joiner) OsSeparatorJoinExpand(
	isNormalizePlusLongPathFix bool,
) string

func (*Joiner) OsSeparatorJoinNormalized added in v0.2.5

func (it *Joiner) OsSeparatorJoinNormalized(
	isExpandEnvVars bool,
) string

func (*Joiner) String

func (it *Joiner) String() string

String normalize + expand and long path fix true

Usages osconsts.PathSeparator as separator

func (*Joiner) ToString

func (it *Joiner) ToString(
	sep string,
	isExpandEnvVars,
	isNormalizePlusLongPathFix bool,
) string

ToString isNormalizePlusLongPathFix if true then adds UNC path fix for Windows

Jump to

Keyboard shortcuts

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