public function getHomeDirectory($os = PHP_OS) { if (strtoupper(substr($os, 0, 3)) !== 'WIN') { return getenv('HOME'); } return getenv('userprofile'); }