normalize

package
v0.2.4 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ChangeDoubleBackSlash

func ChangeDoubleBackSlash(path, changeSeparator string) string

func ChangeDoubleForwardSlash

func ChangeDoubleForwardSlash(path, changeSeparator string) string

func ChangeSeparator

func ChangeSeparator(
	path,
	currentSeparator,
	changeSeparator string,
) string

func GetCompiledPath

func GetCompiledPath(
	pathTemplate string,
	compilingMap map[string]string,
) string

func GetFilterPathsInfoMap added in v0.1.3

func GetFilterPathsInfoMap(
	isNormalize,
	isSkipOnInvalid bool,
	locations []string,
) *chmodhelper.FilteredPathFileInfoMap

func GetLongPathFixed

func GetLongPathFixed(givenAbsolutePath string, isForce bool) string

GetLongPathFixed Adds constants.LongPathQuestionMarkPrefix if path is longer than 255 and doesn't already contains it. Ignores prefix apply if already has it (constants.LongPathUncPrefix or constants.LongPathQuestionMarkPrefix ) or path is empty or length less than 255 if path starts with `\\` then replaces with constants.LongPathUncPrefix

func GetLongPathFixedUsingSeparator added in v0.1.3

func GetLongPathFixedUsingSeparator(
	separator string,
	givenAbsolutePath string,
	isForce bool,
) string

Adds constants.LongPathQuestionMarkPrefix if path is longer than 255 and doesn't already contains it. Ignores prefix apply if already has it (constants.LongPathUncPrefix or constants.LongPathQuestionMarkPrefix ) or path is empty or length less than 255 if path starts with `\\` then replaces with constants.LongPathUncPrefix

func JoinNormalized2 added in v0.1.3

func JoinNormalized2(baseLocation string, nextLocation string) string

func JoinNormalized3 added in v0.1.3

func JoinNormalized3(baseLocation string, next1, next2 string) string

func JoinNormalizedPaths added in v0.1.3

func JoinNormalizedPaths(baseLocation string, locations ...string) string

func Path

func Path(givenPath string) string

Path By default apply long path fix and regular normalize using os.PathSeparator

func PathUsingSeparator

func PathUsingSeparator(
	pathSeparator,
	givenPath string,
	isLongPathFix bool,
	isForceLongPath bool,
) string

Always returns path without the separator at the end. Separator must be one char. Long path fix will not be applied other than Windows operating system.

func PathUsingSeparatorIf

func PathUsingSeparatorIf(
	isForceLongPath,
	isLongPathFix,
	isNormalize bool,
	pathSeparator,
	givenPath string,
) string

func PathUsingSeparatorUsingSingleIf

func PathUsingSeparatorUsingSingleIf(
	isNormalizeLongPathForce bool,
	pathSeparator,
	givenPath string,
) string

func PathUsingSingleIf added in v0.1.3

func PathUsingSingleIf(
	isNormalizeLongPathForce bool,
	givenPath string,
) string

func PathsOnConditions added in v0.1.2

func PathsOnConditions(isNormalize bool, locations []string) []string

func PathsUsingSingleIf added in v0.1.3

func PathsUsingSingleIf(
	isNormalizeLongPathForce bool,
	locations []string,
) []string

func PathsUsingSingleIfAsync added in v0.1.3

func PathsUsingSingleIfAsync(
	isNormalizeLongPathForce bool,
	locations []string,
) []string

Types

This section is empty.

Jump to

Keyboard shortcuts

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