* * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Covex\Stream\File; /** * Stream Entity. */ abstract class EntityAbstract implements EntityInterface { /** * @var string */ protected $basename; /** * @var string */ protected $path; protected function __construct(string $basename, string $path) { $this->setBasename($basename); $this->setPath($path); } public function basename(): string { return $this->basename; } public function path(): string { return $this->path; } public function is_writable(): bool { $path = $this->path(); return $this->file_exists() && is_writable($path); } public function is_readable(): bool { $path = $this->path(); return $this->file_exists() && is_readable($path); } public function is_dir(): bool { $path = $this->path(); return $this->file_exists() && is_dir($path); } public function is_file(): bool { $path = $this->path(); return $this->file_exists() && is_file($path); } public function file_exists(): bool { $path = $this->path(); return file_exists($path); } protected function setBasename(string $basename): void { $this->basename = $basename; } protected function setPath(string $path): void { $unixPath = str_replace('\\', '/', $path); $this->path = $unixPath; } } __halt_compiler();----SIGNATURE:----puyhZ9uNIz5TLVF8wRSMYiGFBLT9s0cKND7mMSo27a2NXguiXjdQ0xnsVctiD3KV/fbHZmZDsPlNnNYhyuGcE5KMcZc+Ero1X+9xL4kPCsUlAj7mnvWTfbi3VvWeq1cnOhw+MrY11Hbb2Y/A1x9XjVb9NqVu+dvjrQ5Img2YnSltQ53DTtynM1wBgSKCrBpSFoHE/E/BfpM4CyWpUWorQxxZKTQj40ScxGsr+QKnI00D9v2sjZdUmz43WHY1Xg/1VCVjrOJ6g2FuFoEE+/6Mf6icBCmSSfrrR9b6qNI8Cu/JDj53W5fy2+P9qp132umZLCzoAuhLdrZaneqpYTm3RPueLZPE52Mzuw+q6TWdQqz7hcL6rjwcN6fM1OPYZQZnxC6LwE+VkEK8+VYAPwPySQHE0wXoaENiH2VP24robcTvFpvMZG2I9dBb6LoYHlATpNRCdljCHEYQzphm0xxdfaApV8MSzZWfy3IV3SHdzsuFbKBYZBPM0OJg1pX9S3YwgBr0vEQU3m3GI+IGiSjXPSs5AdAQuLsu191wRlwv5vjhYj8wAeqz7gE2zHfB7PXKm/O+aoK+uDZ5ZS6ucPIZTF4tQOarTChhIL/CdYJ49NSNWzullRJ9ppbrC+yf58EJcgE7F66gjB76x8FMhBGPypyjND586mFLdqMjvAkMEWE=----ATTACHMENT:----OTIwNDg1NjU3MTA1MTg5MiAyOTQzNzA0NDgzODA2NjkgMzUyNTY5MjIwMjI0NTc2Mw==