handle rmdir on files for ftp storages
This commit is contained in:
parent
15877ac7eb
commit
db89d1cec8
1 changed files with 4 additions and 1 deletions
|
@ -40,8 +40,11 @@ abstract class StreamWrapper extends Common {
|
|||
}
|
||||
|
||||
public function rmdir($path) {
|
||||
if ($this->file_exists($path) && $this->isDeletable($path)) {
|
||||
if ($this->is_dir($path) && $this->isDeletable($path)) {
|
||||
$dh = $this->opendir($path);
|
||||
if (!is_resource($dh)) {
|
||||
return false;
|
||||
}
|
||||
while (($file = readdir($dh)) !== false) {
|
||||
if ($this->is_dir($path . '/' . $file)) {
|
||||
$this->rmdir($path . '/' . $file);
|
||||
|
|
Loading…
Reference in a new issue