⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.19
Server IP:
178.33.27.10
Server:
Linux cpanel.dev-unit.com 3.10.0-1160.108.1.el7.x86_64 #1 SMP Thu Jan 25 16:17:31 UTC 2024 x86_64
Server Software:
Apache/2.4.57 (Unix) OpenSSL/1.0.2k-fips
PHP Version:
8.2.11
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
home
/
id
/
public_html
/
vendor
/
nette
/
utils
/
src
/
Utils
/
View File Name :
FileInfo.php
<?php /** * This file is part of the Nette Framework (https://nette.org) * Copyright (c) 2004 David Grudl (https://davidgrudl.com) */ declare(strict_types=1); namespace Nette\Utils; use Nette; /** * Represents the file or directory returned by the Finder. * @internal do not create instances directly */ final class FileInfo extends \SplFileInfo { private string $relativePath; public function __construct(string $file, string $relativePath = '') { parent::__construct($file); $this->setInfoClass(static::class); $this->relativePath = $relativePath; } /** * Returns the relative directory path. */ public function getRelativePath(): string { return $this->relativePath; } /** * Returns the relative path including file name. */ public function getRelativePathname(): string { return ($this->relativePath === '' ? '' : $this->relativePath . DIRECTORY_SEPARATOR) . $this->getBasename(); } /** * Returns the contents of the file. * @throws Nette\IOException */ public function read(): string { return FileSystem::read($this->getPathname()); } /** * Writes the contents to the file. * @throws Nette\IOException */ public function write(string $content): void { FileSystem::write($this->getPathname(), $content); } }