MCPcopy Create free account
hub / github.com/deepnote/vscode-deepnote / getUserHomeDir

Function getUserHomeDir

src/platform/common/utils/platform.node.ts:31–39  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

29}
30
31export function getUserHomeDir(): Uri {
32 if (getOSType() === OSType.Windows) {
33 return Uri.file(getEnvironmentVariable('USERPROFILE') || homePath);
34 }
35 const homeVar = getEnvironmentVariable('HOME') || getEnvironmentVariable('HOMEPATH') || homePath;
36
37 // Make sure if linux, it uses linux separators
38 return Uri.file(homeVar.replace(/\\/g, '/'));
39}

Callers 5

tryGetHomePathFunction · 0.90
initializeFunction · 0.90
getCandidatesMethod · 0.90
userHomeMethod · 0.90
PlatformServiceClass · 0.90

Calls 4

getOSTypeFunction · 0.90
getEnvironmentVariableFunction · 0.85
fileMethod · 0.45
replaceMethod · 0.45

Tested by 1

initializeFunction · 0.72