Skip to content

Commit

Permalink
realpath and bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
doganoo committed Nov 25, 2018
1 parent b011d0b commit fd5664e
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/FileSystem/DirHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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;
}
}

0 comments on commit fd5664e

Please sign in to comment.