pathmap

package
v0.1.2-alpha Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package pathmap resolves local filesystem paths to remote paths and vice versa using the Mapping rules from the project config.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Mapper

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

Mapper translates between local absolute paths and remote absolute paths.

func New

func New(projectRoot string, mappings []config.Mapping, host config.Host) *Mapper

New creates a Mapper for the given host and project mappings.

func (*Mapper) LocalToRemote

func (m *Mapper) LocalToRemote(absLocal string) (string, error)

LocalToRemote converts an absolute local path to an absolute remote path. When any effective mappings are configured, the file must match one of them. Falls back to host.RootPath + relative path when no mappings are configured.

func (*Mapper) RemoteToLocal

func (m *Mapper) RemoteToLocal(absRemote string) (string, error)

RemoteToLocal converts an absolute remote path to an absolute local path.

Jump to

Keyboard shortcuts

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