From 1fe9b789f3bceafa0cf44096d47b360d61e45276 Mon Sep 17 00:00:00 2001 From: Philipp Holzer Date: Tue, 22 Oct 2019 22:51:52 +0200 Subject: [PATCH] Add some PHP doc --- src/Util/FileSystem.php | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/Util/FileSystem.php b/src/Util/FileSystem.php index 33e04788e6..b3a0ae74de 100644 --- a/src/Util/FileSystem.php +++ b/src/Util/FileSystem.php @@ -2,6 +2,9 @@ namespace Friendica\Util; +/** + * Util class for filesystem manipulation + */ final class FileSystem { /** @@ -9,6 +12,13 @@ final class FileSystem */ private $errorMessage; + /** + * Creates a directory based on a file, which gets accessed + * + * @param string $file The file + * + * @return string The directory name (empty if no directory is found, like urls) + */ public function createDir(string $file) { $dirname = null; @@ -39,6 +49,13 @@ final class FileSystem } } + /** + * Creates a stream based on a URL (could be a local file or a real URL) + * + * @param string $url The file/url + * + * @return false|resource the open stream ressource + */ public function createStream(string $url) { $directory = $this->createDir($url); -- 2.39.5