vault: Index | Files

package pathmanager

import ""


Package Files


type PathManager Uses

type PathManager struct {
    // contains filtered or unexported fields

PathManager is a prefix searchable index of paths

func New Uses

func New() *PathManager

New creates a new path manager

func (*PathManager) AddPaths Uses

func (p *PathManager) AddPaths(paths []string)

AddPaths adds path to the paths list

func (*PathManager) HasExactPath Uses

func (p *PathManager) HasExactPath(path string) bool

HasExactPath returns if the longest match is an exact match for the full path

func (*PathManager) HasPath Uses

func (p *PathManager) HasPath(path string) bool

HasPath returns if the prefix for the path exists regardless if it is a path (ending with /) or a prefix for a leaf node

func (*PathManager) Len Uses

func (p *PathManager) Len() int

Len returns the number of paths

func (*PathManager) Paths Uses

func (p *PathManager) Paths() []string

Paths returns the path list

func (*PathManager) RemovePathPrefix Uses

func (p *PathManager) RemovePathPrefix(prefix string)

RemovePathPrefix removes all paths with the given prefix

func (*PathManager) RemovePaths Uses

func (p *PathManager) RemovePaths(paths []string)

RemovePaths removes paths from the paths list

Package pathmanager imports 3 packages (graph) and is imported by 2 packages. Updated 2019-04-12. Refresh now. Tools for package owners.