MCPcopy Create free account
hub / github.com/pgadmin-org/pgadmin4 / getLocalAppDataPath

Function getLocalAppDataPath

runtime/src/js/misc.js:66–76  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

64// This function is used to get the [local] app data path
65// based on the platform. Use this for logs etc.
66const getLocalAppDataPath = () => {
67 let localAppDataPath = app.getPath('userData');
68 if(process.platform == 'linux' && 'XDG_DATA_HOME' in process.env) {
69 localAppDataPath = path.join(process.env.XDG_DATA_HOME, app.name);
70 }
71
72 // Create directory if not exists
73 createDir(localAppDataPath);
74
75 return localAppDataPath;
76};
77
78// This function is used to get the random available TCP port
79// if fixedPort is set to 0. Else check whether port is in used or not.

Callers 1

misc.jsFile · 0.85

Calls 2

createDirFunction · 0.85
joinMethod · 0.80

Tested by

no test coverage detected