Skip to content

Commit e5a4f85

Browse files
committed
dir exists
1 parent ae229ad commit e5a4f85

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/FileSystem/DirHandler.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,4 +163,14 @@ public function toRealPath(): ?string {
163163
if (false === $realpath) return null;
164164
return $realpath;
165165
}
166+
167+
/**
168+
* @return bool
169+
*/
170+
public function exists(): bool {
171+
$path = $this->toRealPath();
172+
173+
return null !== $path && true === \is_dir($path);
174+
}
175+
166176
}

0 commit comments

Comments
 (0)