X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FUtil%2FFileSystem.php;h=e86d6b595ab324b4262dbcdaad96675fa72b68b5;hb=e02c475c9e98f27f631bd245592f1641c181db72;hp=33e04788e6921b184ad600f904300b2f2aea50e3;hpb=6b2c28e2d72d618bd46b9264f9e348725d7b5f5f;p=friendica.git diff --git a/src/Util/FileSystem.php b/src/Util/FileSystem.php index 33e04788e6..e86d6b595a 100644 --- a/src/Util/FileSystem.php +++ b/src/Util/FileSystem.php @@ -1,14 +1,43 @@ . + * + */ namespace Friendica\Util; -final class FileSystem +/** + * Util class for filesystem manipulation + */ +class FileSystem { /** * @var string a error message */ 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 +68,15 @@ 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 resource the open stream rssource + * + * @throws \UnexpectedValueException + */ public function createStream(string $url) { $directory = $this->createDir($url);