public static getHomeDirectory ( ) : string | ||
return | string | The absolute path to the user's home directory. |
/** * @return string */ protected function getHomeDir() { if (!isset(self::$homeDir)) { $fs = new FilesystemHelper(); self::$homeDir = $fs->getHomeDirectory(); } return self::$homeDir; }
/** * @return string */ protected function getCacheDir() { $sessionId = 'cli-' . preg_replace('/[\\W]+/', '-', self::$sessionId); $fs = new FilesystemHelper(); return $fs->getHomeDirectory() . '/.platformsh/.session/sess-' . $sessionId; }
/** * @return string */ protected function getHomeDir() { if (!isset(self::$homeDir)) { self::$homeDir = FilesystemHelper::getHomeDirectory(); } return self::$homeDir; }
/** * Test FilesystemHelper::getHomeDirectory(). */ public function testGetHomeDirectory() { $homeDir = $this->filesystemHelper->getHomeDirectory(); $this->assertNotEmpty($homeDir, 'Home directory returned'); $this->assertNotEmpty(realpath($homeDir), 'Home directory exists'); }
/** * @return string */ public function getUserConfigDir() { return FilesystemHelper::getHomeDirectory() . '/' . $this->get('application.user_config_dir'); }