From 9efaf00efa3c324154ec1194e6b7091e5f5f49a1 Mon Sep 17 00:00:00 2001 From: Mohamed Said Date: Wed, 2 Aug 2017 20:17:09 +0200 Subject: [PATCH] add path method to get the full path of the given file --- src/Illuminate/Filesystem/FilesystemAdapter.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/Illuminate/Filesystem/FilesystemAdapter.php b/src/Illuminate/Filesystem/FilesystemAdapter.php index 4a4dacf1f8dc..d9c2054216cb 100644 --- a/src/Illuminate/Filesystem/FilesystemAdapter.php +++ b/src/Illuminate/Filesystem/FilesystemAdapter.php @@ -305,6 +305,17 @@ public function lastModified($path) return $this->driver->getTimestamp($path); } + /** + * Get the full path for the file at the given path. + * + * @param string $path + * @return string + */ + public function path($path) + { + return $this->driver->getAdapter()->getPathPrefix().$path; + } + /** * Get the URL for the file at the given path. *