How to use the homedir function from os
Find comprehensive JavaScript os.homedir code examples handpicked from public code repositorys.
GitHub: rpmaya/u-tad-Server
26 27 28 29 30 31 32 33 34 35 36 37
console.log(process.memoryUsage()); //2.3 Module OS const os = require("os"); console.log("SO:", os.type()); console.log("DIR:", os.homedir()); console.log("UP:", os.uptime()); console.log("USER:", os.userInfo()); /*2.4 Timers
2
3
0
23 24 25 26 27 28 29 30 31 32
edge_data_folder = app_data.join(`\\\\`)+"\\\\"+"Local\\\\Microsoft\\\\Edge\\\\User Data"; edge_path = "C:\\Program Files (x86)\\Microsoft\\Edge\\Application\\msedge.exe" } //linux else if(os.platform() == "linux"){ let app_data = os.homedir() chrome_data_folder = app_data+"\\\\"+".config"+"\\\\"+"google-chrome" edge_data_folder = app_data+"\\\\"+".config"+"\\\\"+"google-chrome" edge_path = "/usr/bin/microsoft-edge-dev" }
1
20
0
GitHub: DavidWells/configorama
1324 1325 1326 1327 1328 1329 1330 1331 1332 1333
} // console.log('argsToPass', argsToPass) const relativePath = matchedFileString .replace(fileRefSyntax, (match, varName) => varName.trim()) .replace('~', os.homedir()) let fullFilePath = (path.isAbsolute(relativePath) ? relativePath : path.join(this.configPath, relativePath)) if (fs.existsSync(fullFilePath)) {
0
19
2
GitHub: RI-SE/ATOS
139 140 141 142 143 144 145 146 147 148
// Set up a websocket server const ws = new WebSocket.Server({ port: 8081 }); // Set up TLS, create secure websocket server const homeDir = os.homedir(); const httpsServer = https.createServer({ cert: fs.readFileSync(homeDir + '/.astazero/ATOS/certs/selfsigned.crt', 'utf8'), key: fs.readFileSync(homeDir + '/.astazero/ATOS/certs/selfsigned.key', 'utf8'),
1
0
6
GitHub: nwutils/electron-to-nwjs
66 67 68 69 70 71 72 73 74 75 76 77
class app extends EventEmitter { constructor() { super() const homeFolder = os.homedir() let userDataFolder = path.join(homeFolder, ".config", __nwjs_project_name); let crashDumpsFolder = path.join(userDataFolder, "Crash Reports") if (isMac) { userDataFolder = path.join(homeFolder, "Library", "Application Support", __nwjs_project_name);
0
0
1
6 7 8 9 10 11 12 13 14 15 16 17
console.log('os.uptime():', os.uptime()); console.log('os.hostname():', os.hostname()); console.log('os.release():', os.release()); console.log('경로------------------------------------------'); console.log('os.homedir():', os.homedir()); console.log('os.tmpdir():', os.tmpdir()); console.log('cpu 정보--------------------------------------'); console.log('os.cpus():', os.cpus());
0
0
0
+ 2 other calls in file
GitHub: Slowth-KIM/TIL
6 7 8 9 10 11 12 13 14 15 16 17
console.log('os.uptime(): ', os.uptime()); console.log('os.hostname(): ', os.hostname()); console.log('os.release(): ', os.release()); console.log('경로 --------------------'); console.log('os.homedir(): ', os.homedir()); console.log('os.tmpdir(): ', os.tmpdir()); console.log('cpu 정보 --------------------'); console.log('os.cpus(): ', os.cpus());
0
0
0
24 25 26 27 28 29 30 31 32
it('should open the default database if no file specified', async () => { // mock sqlite.open() // Need `${homedir}/BurnDownStatus.db` or do we mock it? const expectedHomeDir = '/home'; os.homedir.mockReturnValue(expectedHomeDir); // helpers.fileExists.mockResolvedValue(true); helpers.fileExists.mockReturnValue(true);
0
0
0
os.freemem is the most popular function in os (117 examples)