uawdijnntqw1x1x1
IP : 216.73.216.163
Hostname : yjpwxulqtt
Kernel : Linux yjpwxulqtt 5.15.0-126-generic #136-Ubuntu SMP Wed Nov 6 10:38:22 UTC 2024 x86_64
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,exec,system,passthru,shell_exec,proc_open,popen
OS : Linux
PATH:
/
home
/
user
/
web
/
pansionat-v-yaroslavle.ru
/
public_html
/
bitrix
/
modules
/
main
/
lib
/
io
/
directory.php
/
/
<?php namespace Bitrix\Main\IO; class Directory extends DirectoryEntry { public function __construct($path, $siteId = null) { parent::__construct($path, $siteId); } public function isExists() { $p = $this->getPhysicalPath(); return file_exists($p) && is_dir($p); } public function delete() { return self::deleteInternal($this->getPhysicalPath()); } private static function deleteInternal($path) { if (is_file($path) || is_link($path)) { if (!@unlink($path)) throw new FileDeleteException($path); } elseif (is_dir($path)) { if ($handle = opendir($path)) { while (($file = readdir($handle)) !== false) { if ($file == "." || $file == "..") continue; self::deleteInternal(Path::combine($path, $file)); } closedir($handle); } if (!@rmdir($path)) throw new FileDeleteException($path); } return true; } /** * @return array|FileSystemEntry[] * @throws FileNotFoundException */ public function getChildren() { if (!$this->isExists()) throw new FileNotFoundException($this->originalPath); $arResult = array(); if ($handle = opendir($this->getPhysicalPath())) { while (($file = readdir($handle)) !== false) { if ($file == "." || $file == "..") continue; $pathLogical = Path::combine($this->path, Path::convertPhysicalToLogical($file)); $pathPhysical = Path::combine($this->getPhysicalPath(), $file); if (is_dir($pathPhysical)) $arResult[] = new Directory($pathLogical); else $arResult[] = new File($pathLogical); } closedir($handle); } return $arResult; } /** * @param $name * @return Directory|DirectoryEntry */ public function createSubdirectory($name) { $dir = new Directory(Path::combine($this->path, $name)); if (!$dir->isExists()) mkdir($dir->getPhysicalPath(), BX_DIR_PERMISSIONS, true); return $dir; } public function getCreationTime() { if (!$this->isExists()) throw new FileNotFoundException($this->originalPath); return filectime($this->getPhysicalPath()); } public function getLastAccessTime() { if (!$this->isExists()) throw new FileNotFoundException($this->originalPath); return fileatime($this->getPhysicalPath()); } public function getModificationTime() { if (!$this->isExists()) throw new FileNotFoundException($this->originalPath); return filemtime($this->getPhysicalPath()); } public function markWritable() { if (!$this->isExists()) throw new FileNotFoundException($this->originalPath); @chmod($this->getPhysicalPath(), BX_DIR_PERMISSIONS); } public function getPermissions() { return fileperms($this->getPhysicalPath()); } /** * @param $path * * @return Directory */ public static function createDirectory($path) { $dir = new self($path); $dir->create(); return $dir; } public static function deleteDirectory($path) { $dir = new self($path); $dir->delete(); } public static function isDirectoryExists($path) { $f = new self($path); return $f->isExists(); } }
/home/user/web/pansionat-v-yaroslavle.ru/public_html/bitrix/modules/main/lib/io/directory.php