Encodes an absolute filesystem path to Claude's project directory name format.
Encodes an absolute filesystem path to Claude's project directory name format.
Claude stores conversation logs in a projects directory, using a path-encoded name for each project subdirectory. The encoding replaces every / separator with -, so /home/user/project becomes -home-user-project.
Note: this encoding is lossy when original path segments contain - characters. The symmetric decoder (ProjectPathDecoder.decode) cannot unambiguously recover those paths.