uawdijnntqw1x1x1
IP : 216.73.217.167
Hostname : xhost1.intravision.ru
Kernel : Linux xhost1.intravision.ru 3.16.0-7-amd64 #1 SMP Debian 3.16.59-1 (2018-10-03) x86_64
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,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,
OS : Linux
PATH:
/
var
/
www
/
tiskom
/
data
/
www
/
tiskom.xhost.intravision.ru
/
bitrix
/
.
/
modules
/
translate
/
lib
/
io
/
file.php
/
/
<?php declare(strict_types = 1); namespace Bitrix\Translate\IO; use Bitrix\Translate; use Bitrix\Main; class File extends Main\IO\File implements Translate\IErrorable { // trait implements interface Translate\IErrorable use Translate\Error; /** * Creates temporal file. * * @param string $prefix Name prefix. * @param string $suffix Name suffix. * @param int $timeToLive Hours to keep files alive. * * @return static */ public static function generateTemporalFile(string $prefix, string $suffix = '.tmp', int $timeToLive = 3): self { $tempDir = \CTempFile::GetDirectoryName($timeToLive, array($prefix, uniqid($prefix, true))); Path::checkCreatePath($tempDir.'/'); $hash = str_pad(dechex(crc32($tempDir)), 8, '0', STR_PAD_LEFT); $fileName = uniqid($hash. '_', false). $suffix; return new static($tempDir. $fileName); } /** * Opens file for reading. * * @return bool */ public function openLoad(): bool { if ($this->isExists()) { $this->open(Main\IO\FileStreamOpenMode::READ); } return $this->isExists() && $this->isReadable(); } /** * Opens file for writing. * * @return bool */ public function openWrite(): bool { $this->open(Main\IO\FileStreamOpenMode::WRITE); return $this->isWritable(); } /** * Read file. * * @param int $length Amount bytes to read. * * @return string */ public function read(int $length): string { if (feof($this->filePointer)) { return ''; } return fread($this->filePointer, $length); } /** * Write file. * * @param string $content Data to write. * * @return int * @throws Main\IO\FileNotOpenedException * @throws Main\IO\IoException */ public function write(string $content): int { if (!is_resource($this->filePointer)) { throw new Main\IO\FileNotOpenedException($this->getPath()); } $length = fwrite($this->filePointer, $content); if ($length === false) { throw new Main\IO\IoException("Cannot write file"); } return $length; } /** * Closes the file. * * @return void * @throws Main\IO\FileNotOpenedException */ public function close(): void { if (!is_resource($this->filePointer)) { @fflush($this->filePointer); } parent::close(); @clearstatcache(true, $this->getPhysicalPath()); } }
/var/www/tiskom/data/www/tiskom.xhost.intravision.ru/bitrix/./modules/translate/lib/io/file.php