Pressroom template verwijderd, website naar root van repo
This commit is contained in:
36
vendor/league/flysystem/src/Adapter/Ftpd.php
vendored
Normal file
36
vendor/league/flysystem/src/Adapter/Ftpd.php
vendored
Normal file
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
namespace League\Flysystem\Adapter;
|
||||
|
||||
class Ftpd extends Ftp
|
||||
{
|
||||
/**
|
||||
* @inheritdoc
|
||||
*/
|
||||
public function getMetadata($path)
|
||||
{
|
||||
if (empty($path) || ! ($object = ftp_raw($this->getConnection(), 'STAT ' . $path)) || count($object) < 3) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (substr($object[1], 0, 5) === "ftpd:") {
|
||||
return false;
|
||||
}
|
||||
|
||||
return $this->normalizeObject($object[1], '');
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
*/
|
||||
protected function listDirectoryContents($directory, $recursive = true)
|
||||
{
|
||||
$listing = ftp_rawlist($this->getConnection(), $directory, $recursive);
|
||||
|
||||
if ($listing === false || ( ! empty($listing) && substr($listing[0], 0, 5) === "ftpd:")) {
|
||||
return [];
|
||||
}
|
||||
|
||||
return $this->normalizeListing($listing, $directory);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user