From 81bc07ea59858822c86364fb554b911f38d11dad Mon Sep 17 00:00:00 2001 From: Will Rowe Date: Wed, 8 Jan 2025 17:04:32 -0500 Subject: [PATCH] Add method to retrieve the generated name --- src/TemporaryDirectory.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/TemporaryDirectory.php b/src/TemporaryDirectory.php index 71d14a3..907cf8f 100644 --- a/src/TemporaryDirectory.php +++ b/src/TemporaryDirectory.php @@ -107,6 +107,11 @@ public function exists(): bool return file_exists($this->getFullPath()); } + public function getName(): string + { + return $this->name; + } + protected function getFullPath(): string { return $this->location.(! empty($this->name) ? DIRECTORY_SEPARATOR.$this->name : '');