pathutil

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package pathutil provides cross-platform path utilities for cdev.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EncodePath

func EncodePath(path string) string

EncodePath converts a filesystem path to a flat string safe for use as a directory or file name. This matches the encoding Claude CLI uses for session storage under ~/.claude/projects/.

Examples:

Unix:    /Users/brian/Projects/cdev  → -Users-brian-Projects-cdev
Windows: C:\Users\brian\Projects\cdev → -C:-Users-brian-Projects-cdev

func ShellCommand

func ShellCommand(command string) *exec.Cmd

ShellCommand returns an *exec.Cmd that runs the given command string through the platform's default shell.

Unix/macOS: bash -c "<command>"
Windows:    cmd.exe /C "<command>"

func ShellCommandContext

func ShellCommandContext(ctx context.Context, command string) *exec.Cmd

ShellCommandContext is like ShellCommand but accepts a context for cancellation.

Types

This section is empty.

Jump to

Keyboard shortcuts

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