Server IP : 185.86.78.101 / Your IP : 216.73.216.124 Web Server : Apache System : Linux 675867-vds-valikoshka1996.gmhost.pp.ua 5.4.0-150-generic #167-Ubuntu SMP Mon May 15 17:35:05 UTC 2023 x86_64 User : www ( 1000) PHP Version : 7.4.33 Disable Function : passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /www/wwwroot/mifepriston.org/node_modules/homedir-polyfill/ |
Upload File : |
'use strict'; var fs = require('fs'); var parse = require('parse-passwd'); function homedir() { // The following logic is from looking at logic used in the different platform // versions of the uv_os_homedir function found in https://github.com/libuv/libuv // This is the function used in modern versions of node.js if (process.platform === 'win32') { // check the USERPROFILE first if (process.env.USERPROFILE) { return process.env.USERPROFILE; } // check HOMEDRIVE and HOMEPATH if (process.env.HOMEDRIVE && process.env.HOMEPATH) { return process.env.HOMEDRIVE + process.env.HOMEPATH; } // fallback to HOME if (process.env.HOME) { return process.env.HOME; } return null; } // check HOME environment variable first if (process.env.HOME) { return process.env.HOME; } // on linux platforms (including OSX) find the current user and get their homedir from the /etc/passwd file var passwd = tryReadFileSync('/etc/passwd'); var home = find(parse(passwd), getuid()); if (home) { return home; } // fallback to using user environment variables var user = process.env.LOGNAME || process.env.USER || process.env.LNAME || process.env.USERNAME; if (!user) { return null; } if (process.platform === 'darwin') { return '/Users/' + user; } return '/home/' + user; } function find(arr, uid) { var len = arr.length; for (var i = 0; i < len; i++) { if (+arr[i].uid === uid) { return arr[i].homedir; } } } function getuid() { if (typeof process.geteuid === 'function') { return process.geteuid(); } return process.getuid(); } function tryReadFileSync(fp) { try { return fs.readFileSync(fp, 'utf8'); } catch (err) { return ''; } } module.exports = homedir;