@mcp-z/client
    Preparing search index...

    Function resolvePath

    • Resolve a file path relative to a working directory.

      Handles three cases:

      • ~ or ~/path - Expands to home directory
      • Absolute paths - Returns as-is
      • Relative paths - Resolves relative to cwd

      Parameters

      • filePath: string

        The path to resolve

      • cwd: string

        The working directory for resolving relative paths

      Returns string

      The resolved absolute path

      resolvePath('~/config.json', '/unused')  // → '/home/user/config.json'
      resolvePath('/absolute/path', '/unused') // → '/absolute/path'
      resolvePath('./relative', '/base') // → '/base/relative'