workspace

package
v0.7.1 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Clean

func Clean(raw string) (string, error)

Clean remains a lexical helper for patch parsing. It is not a security boundary.

func Hidden

func Hidden(name string) bool

func WindowsPathToWSL added in v0.6.0

func WindowsPathToWSL(raw string) (string, bool)

WindowsPathToWSL 把绝对 Windows 盘符路径转换为 WSL /mnt 路径。

Types

type Path

type Path struct {
	Display string `json:"display"`
	Abs     string `json:"-"`
	Exists  bool   `json:"exists"`
}

type Workspace

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

func New

func New(root string) (*Workspace, error)

New builds the single Host path resolver.

func (*Workspace) DefaultCWD

func (w *Workspace) DefaultCWD() string

func (*Workspace) DefaultDisplay

func (w *Workspace) DefaultDisplay() string

func (*Workspace) Relative

func (w *Workspace) Relative(abs string) (string, error)

func (*Workspace) ResolveExisting

func (w *Workspace) ResolveExisting(raw string) (Path, error)

func (*Workspace) ResolveForWrite

func (w *Workspace) ResolveForWrite(raw string) (Path, error)

func (*Workspace) Root

func (w *Workspace) Root() string

func (*Workspace) SetDefaultCWD

func (w *Workspace) SetDefaultCWD(raw string) (string, error)

Jump to

Keyboard shortcuts

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