/** * * @return FileSystem */ public static function getInstance() { if (self::$instance === null) { switch (String::asNative(\blaze\lang\System::getProperty('host.fs'))) { case 'UNIX': self::$instance = new UnixFileSystem(); break; case 'WIN32': self::$instance = new Win32FileSystem(); break; case 'WINNT': self::$instance = new WinNTFileSystem(); break; default: throw new \blaze\lang\Exception('Host uses unsupported filesystem, unable to proceed'); } } return self::$instance; }
/** * Returns the path to the temp directory. */ public function getTempDir() { return System::getProperty('php.tmpdir'); }
private function _getUserPath() { //For both compatibility and security, we must look this up every time return (string) $this->normalize(\blaze\lang\System::getProperty("user.dir")); }
/** * the file resolver */ public function resolveFile(File $f) { // resolve if parent is a file oject only if ($this->isAbsolute($f)) { return $f->getPath()->toNative(); } else { return $this->resolve(\blaze\lang\System::getProperty("user.dir"), $f->getPath()->toNative()); } }