Add some PHP doc
This commit is contained in:
parent
4e32d46f97
commit
1fe9b789f3
1 changed files with 17 additions and 0 deletions
|
@ -2,6 +2,9 @@
|
||||||
|
|
||||||
namespace Friendica\Util;
|
namespace Friendica\Util;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Util class for filesystem manipulation
|
||||||
|
*/
|
||||||
final class FileSystem
|
final class FileSystem
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
|
@ -9,6 +12,13 @@ final class FileSystem
|
||||||
*/
|
*/
|
||||||
private $errorMessage;
|
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)
|
public function createDir(string $file)
|
||||||
{
|
{
|
||||||
$dirname = null;
|
$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)
|
public function createStream(string $url)
|
||||||
{
|
{
|
||||||
$directory = $this->createDir($url);
|
$directory = $this->createDir($url);
|
||||||
|
|
Loading…
Reference in a new issue