%PDF-1.5 %���� ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµùÕ5sLOšuY
Server IP : 49.231.201.246 / Your IP : 216.73.216.149 Web Server : Apache/2.4.18 (Ubuntu) System : Linux 246 4.4.0-210-generic #242-Ubuntu SMP Fri Apr 16 09:57:56 UTC 2021 x86_64 User : root ( 0) PHP Version : 7.0.33-0ubuntu0.16.04.16 Disable Function : exec,passthru,shell_exec,system,proc_open,popen,pcntl_exec MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /proc/11584/cwd/html/ppaobm/vendor/codeception/base/src/Codeception/Command/Shared/ |
Upload File : |
<?php namespace Codeception\Command\Shared; use Codeception\Util\Shared\Namespaces; trait FileSystem { use Namespaces; protected function createDirectoryFor($basePath, $className = '') { $basePath = rtrim($basePath, DIRECTORY_SEPARATOR); if ($className) { $className = str_replace(['/', '\\'], [DIRECTORY_SEPARATOR, DIRECTORY_SEPARATOR], $className); $path = $basePath . DIRECTORY_SEPARATOR . $className; $basePath = pathinfo($path, PATHINFO_DIRNAME) . DIRECTORY_SEPARATOR; } if (!file_exists($basePath)) { // Second argument should be mode. Well, umask() doesn't seem to return any if not set. Config may fix this. mkdir($basePath, 0775, true); // Third parameter commands to create directories recursively } return $basePath; } protected function completeSuffix($filename, $suffix) { if (strpos(strrev($filename), strrev($suffix)) === 0) { $filename .= '.php'; } if (strpos(strrev($filename), strrev($suffix . '.php')) !== 0) { $filename .= $suffix . '.php'; } if (strpos(strrev($filename), strrev('.php')) !== 0) { $filename .= '.php'; } return $filename; } protected function removeSuffix($classname, $suffix) { $classname = preg_replace('~\.php$~', '', $classname); return preg_replace("~$suffix$~", '', $classname); } protected function createFile($filename, $contents, $force = false, $flags = null) { if (file_exists($filename) && !$force) { return false; } file_put_contents($filename, $contents, $flags); return true; } }