path

package
v3.10.7 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PathAbsoluteString

func PathAbsoluteString(current, destination string) string

func PathRelativeString

func PathRelativeString(current, destination string) string

Types

type Implementation

type Implementation []PathElement

func (Implementation) All

func (o Implementation) All() []PathElement

func (Implementation) Append

func (o Implementation) Append(child PathElement) Path

func (Implementation) Empty

func (o Implementation) Empty() bool

func (Implementation) First

func (o Implementation) First() PathElement

func (Implementation) Last

func (o Implementation) Last() PathElement

func (Implementation) Length

func (o Implementation) Length() int

func (Implementation) PathMappedString

func (o Implementation) PathMappedString() PathString

func (Implementation) PathString

func (o Implementation) PathString() PathString

func (Implementation) Pop

func (o Implementation) Pop() (PathElement, Path)

func (Implementation) PopFirst

func (o Implementation) PopFirst() (PathElement, Path)

func (Implementation) ReadablePathString added in v3.10.7

func (o Implementation) ReadablePathString() PathString

func (Implementation) ReadableString added in v3.10.7

func (o Implementation) ReadableString() string

func (Implementation) RemoveFirst

func (o Implementation) RemoveFirst() Path

func (Implementation) RemoveLast

func (o Implementation) RemoveLast() Path

func (Implementation) String

func (o Implementation) String() string

type Path

type Path interface {
	Length() int
	PathString() PathString
	PathMappedString() PathString
	String() string
	ReadablePathString() PathString
	ReadableString() string
	Append(child PathElement) Path
	RemoveFirst() Path
	PopFirst() (PathElement, Path)
	Pop() (PathElement, Path)
	RemoveLast() Path
	Empty() bool
	First() PathElement
	Last() PathElement
	All() []PathElement
}

func NewPath

func NewPath(nodes ...PathElement) Path

func NewPathFromString

func NewPathFromString(allocator PathElementAllocator, pathString string) Path

func PathAbsolute

func PathAbsolute(allocator PathElementAllocator, current, destination string) Path

type PathElement

type PathElement interface {
	SetID(id.NodeID)
	GetID() id.NodeID

	SetMappedID(id.NodeID)
	GetMappedID() id.NodeID

	SetKind(kind kind.Kind)
	GetKind() kind.Kind

	ToFormat() f3.Interface
}

type PathElementAllocator

type PathElementAllocator func() PathElement

type PathString

type PathString interface {
	Empty() bool
	Join() string
	Append(element string)
	Elements() []string
}

func NewPathString

func NewPathString() PathString

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳