update v 1.0.7.5

This commit is contained in:
Sujit Prasad
2016-06-13 20:41:55 +05:30
parent aa9786d829
commit 283d97e3ea
5078 changed files with 339851 additions and 175995 deletions

View File

@@ -6,6 +6,7 @@ use DateTime;
use League\Flysystem\AdapterInterface;
use League\Flysystem\Config;
use League\Flysystem\NotSupportedException;
use RuntimeException;
abstract class AbstractFtpAdapter extends AbstractAdapter
{
@@ -79,6 +80,11 @@ abstract class AbstractFtpAdapter extends AbstractAdapter
*/
protected $systemType;
/**
* @var bool
*/
protected $alternativeRecursion = false;
/**
* Constructor.
*
@@ -317,6 +323,8 @@ abstract class AbstractFtpAdapter extends AbstractAdapter
return $this->listDirectoryContents($directory, $recursive);
}
abstract protected function listDirectoryContents($directory, $recursive = false);
/**
* Normalize a directory listing.
*
@@ -395,6 +403,11 @@ abstract class AbstractFtpAdapter extends AbstractAdapter
protected function normalizeUnixObject($item, $base)
{
$item = preg_replace('#\s+#', ' ', trim($item), 7);
if (count(explode(' ', $item, 9)) !== 9) {
throw new RuntimeException("Metadata can't be parsed from item '$item' , not enough parts.");
}
list($permissions, /* $number */, /* $owner */, /* $group */, $size, /* $month */, /* $day */, /* $time*/, $name) = explode(' ', $item, 9);
$type = $this->detectType($permissions);
$path = empty($base) ? $name : $base . $this->separator . $name;
@@ -421,6 +434,11 @@ abstract class AbstractFtpAdapter extends AbstractAdapter
protected function normalizeWindowsObject($item, $base)
{
$item = preg_replace('#\s+#', ' ', trim($item), 3);
if (count(explode(' ', $item, 4)) !== 4) {
throw new RuntimeException("Metadata can't be parsed from item '$item' , not enough parts.");
}
list($date, $time, $size, $name) = explode(' ', $item, 4);
$path = empty($base) ? $name : $base . $this->separator . $name;