for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace LazyEight\DiTesto\FileSystem;
use LazyEight\DiTesto\Interfaces\FileSystem\FileSystemPathInterface;
class FileSystemPath implements FileSystemPathInterface
{
/**
* @var string
*/
private $path;
* FileSystemPath constructor.
* @param string $path
public function __construct(string $path)
$this->path = $path;
}
* @inheritDoc
public function rawPath(): string
return $this->path;
public function pathName(): string
return dirname($this->path);
public function filename(): string
return basename($this->path);
public function size(): int
return filesize($this->path);
public function type(): string
return mime_content_type($this->path);
public function exists(): bool
return file_exists($this->path);
public function isDirectory(): bool
return is_dir($this->path);