MCPcopy Index your code
hub / github.com/codeaashu/claude-code / userHomeDir

Function userHomeDir

src/server/web/pty-server.ts:68–76  ·  view source on GitHub ↗

Returns the user-specific home directory, creating it if needed.

(userId: string)

Source from the content-addressed store, hash-verified

66
67/** Returns the user-specific home directory, creating it if needed. */
68function userHomeDir(userId: string): string {
69 const dir = path.join(USER_HOME_BASE, userId);
70 try {
71 mkdirSync(path.join(dir, ".claude"), { recursive: true });
72 } catch {
73 // Already exists or no permission — fail silently; PTY spawn will surface any real issue.
74 }
75 return dir;
76}
77
78const sessionManager = new SessionManager(
79 MAX_SESSIONS,

Callers 1

pty-server.tsFile · 0.85

Calls 1

mkdirSyncFunction · 0.90

Tested by

no test coverage detected