diff --git a/src/FileSystem/DirHandler.php b/src/FileSystem/DirHandler.php index 9b91674..9184dba 100644 --- a/src/FileSystem/DirHandler.php +++ b/src/FileSystem/DirHandler.php @@ -132,7 +132,7 @@ public function list(): array { * @param string $path * @return array */ - function _list(string $path): array { + private function _list(string $path): array { $result = []; $scan = glob($path . '/*'); foreach ($scan as $item) { @@ -144,4 +144,13 @@ function _list(string $path): array { } return $result; } + + /** + * @return string|null + */ + public function toRealPath(): ?string { + $realpath = \realpath($this->path); + if (false === $realpath) return null; + return $realpath; + } } \ No newline at end of file