MCPcopy Create free account
hub / github.com/IgorWarzocha/howcode / getDefaultElectronUserDataPath

Function getDefaultElectronUserDataPath

desktop/user-data-path.ts:10–25  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

8let cachedUserDataPath: string | null = null
9
10function getDefaultElectronUserDataPath() {
11 switch (process.platform) {
12 case 'darwin':
13 return path.join(os.homedir(), 'Library', 'Application Support', 'howcode')
14 case 'win32':
15 return path.join(
16 getProcessEnvironmentVariable('APPDATA') || path.join(os.homedir(), 'AppData', 'Roaming'),
17 'howcode',
18 )
19 default:
20 return path.join(
21 getProcessEnvironmentVariable('XDG_CONFIG_HOME') || path.join(os.homedir(), '.config'),
22 'howcode',
23 )
24 }
25}
26
27export function getDesktopUserDataPath() {
28 if (cachedUserDataPath) {

Callers 1

getDesktopUserDataPathFunction · 0.85

Calls 1

Tested by

no test coverage detected