Get the User's home path.

@return string
@throws Exception
510078
protected function homePath()
    {
        if (! empty($_SERVER['HOME'])) {
            return $_SERVER['HOME'];
        } elseif (! empty($_SERVER['HOMEDRIVE']) && ! empty($_SERVER['HOMEPATH'])) {
            return $_SERVER['HOMEDRIVE'].$_SERVER['HOMEPATH'];
        } else {
            throw new Exception('Cannot determine home directory.');
        }
    }
537833
public static Resource getHomeDirectory() {
	if (homeFile != null) return homeFile;

	ResourceProvider frp = ResourcesImpl.getFileResourceProvider();

	String homeStr = System.getProperty("user.home");
	if (homeStr != null) {
	    homeFile = frp.getResource(homeStr);
	    homeFile = ResourceUtil.getCanonicalResourceEL(homeFile);
	}
	return homeFile;
    }
367432
@Override
  public String getHomeDirectory() {
    try {
      FileSystem fs = FileSystem.get(CONF);
      return fs.getHomeDirectory().toString();
    }
    catch (Exception e) {
      return null;
    }
  }
928707
public function getName()
    {
        if (!array_key_exists(self::NAME, $this->passwd)) {
            throw new \Exception('Could not get user name from passwd.');
        }
        return $this->passwd[self::NAME];
    }
1332164
def get_home_dir():
    """"""
    _home_dir = os.environ.get('MXNET_HOME', os.path.join('~', '.mxnet'))
    # expand ~ to actual path
    _home_dir = os.path.expanduser(_home_dir)
    return _home_dir
989554
protected function path() {
    if ($this->parent) {
      return $this->parent->path() . '/devices';
    }

    $class = static::$resourceClass;
    $path = $class::$path;
    if ($this->catalog) {
      $path .= '/catalog';
    }
    return $path;
  }
984153
public function getPath()
    {
        $adapter = $this->getFileSystem()->getAdapter();
        if (!$adapter instanceof Local) {
            throw new common_exception_InconsistentData(__CLASS__.' can only handle local files');
        }
        return $adapter->getPathPrefix() . $this->getPrefix();
    }
326814
public function getPath(): string
    {
        if (!isset($this->segments['path'])) {
            throw new UrlException('Unable to get path for ' . $this->url);
        }

        return $this->segments['path'];
    }
317599
public function getPath()
    {
        $path = !empty($this->info['path']) ? '/'.implode('/', $this->info['path']).'/' : '/';

        if (!empty($this->info['file'])) {
            $path .= $this->info['file'];

            if (!empty($this->info['extension'])) {
                $path .= '.'.$this->info['extension'];
            }
        }

        return $path;
    }
869224
private static String getUserHome() {
        String home;

        if (platformType == SelfExtractUtils.PlatformType_CYGWIN) {

            home = System.getenv("HOME");
        } else {
            home = System.getProperty("user.home");
        }
        return home;
    }
1242774
public function getPath()
    {
        $node = $this;
        $path = [];

        while (true) {
            $path[] = $node["name"];
            if ($node->isRoot()) {
                break;
            }

            $node = self::loadById($node["parents"][0]);
            if (is_null($node)) {
                throw new \Exception("No parent node found with ID {$node['parents'][0]}.");
            }

            if ($node->isRoot()) {
                break;
            }
        }

        $path = array_reverse($path);

        return implode('/', $path);
    }
1365944
public function getPath()
    {
        $path = $this->getArgument('path');

        // If path is absolute return it without modifications.
        if (
            strpos($path, 'http://') !== false
            || strpos($path, 'https://') !== false
            || substr($path, 0, 2) === '//'
        ) {
            return $path;
        }

        $filePath = $this->config->get('app.directory').DIRECTORY_SEPARATOR."public/{$path}";
        $fileUrl = $this->config->get('app.path').DIRECTORY_SEPARATOR."public/{$path}";

        if ($this->filesystem->exists($filePath)) {
            return $fileUrl;
        }

        throw new FileNotFoundException("File does not exist at path {$path}");
    }
6421
public function getPath()
    {
        if($this->getType() == 'memory') {
            $this->_path = parse_url($this->_path, PHP_URL_PATH);
        }

        if($this->getType() == 'temp')
        {
            if(!$this->getResource()) {
                $this->_path = $this->getTemporaryFile();
            }
        }

        return parent::getPath();
    }
953750
public function getThumbPath()
    {
        return (!empty($this->thumb_path) ? str_replace($this->getThumbRootDir(), '', DirectoryHelper::slashDirname($this->thumb_path)) : '');
    }
1362099
public function getPath()
    {
        $path = $this->type === 'settings' ? $this->options['settings_config_path'] : $this->options['model_config_path'];

        return rtrim($path, '/').'/';
    }
1145097
@Pure
	public static File getUserHomeDirectory() throws FileNotFoundException {
		final String userHome = System.getProperty("user.home"); //$NON-NLS-1$
		if (userHome != null && !userHome.isEmpty()) {
			final File file = new File(userHome);
			if (file.isDirectory()) {
				return file;
			}
		}
		if (OperatingSystem.ANDROID.isCurrentOS()) {
			return join(File.listRoots()[0], Android.HOME_DIRECTORY);
		}
		throw new FileNotFoundException();
	}
585897
private function getPath() {
		if(strpos($this->i18nMessagePath, '/') === 0 || strpos($this->i18nMessagePath, ':/') === 1) {
			return $this->i18nMessagePath;
		}
		return ROOT_PATH.$this->i18nMessagePath;
	}