MCPcopy
hub / github.com/modelcontextprotocol/servers / expandHome

Function expandHome

src/filesystem/path-utils.ts:119–124  ·  view source on GitHub ↗
(filepath: string)

Source from the content-addressed store, hash-verified

117 * @returns Expanded path
118 */
119export function expandHome(filepath: string): string {
120 if (filepath.startsWith('~/') || filepath === '~') {
121 return path.join(os.homedir(), filepath.slice(1));
122 }
123 return filepath;
124}
125

Callers 3

validatePathFunction · 0.85
index.tsFile · 0.85
path-utils.test.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected