public function cleanDir($directory)
    {
        if (!$files = $this->nlist($directory)) {
            return $this->isEmpty($directory);
        }

        // remove children
        foreach ($files as $file) {
            $this->remove($file, true);
        }

        return $this->isEmpty($directory);
    }
public function cleanDir($directory)
    {
        if (!$files = $this->nlist($directory)) {
            return $this->isEmpty($directory);
        }

        // remove children
        foreach ($files as $file) {
            $this->remove($file, true);
        }

        return $this->isEmpty($directory);
    }
public function cleanDir ( $ directory ) { if ( ! $ files = $ this -> nlist ( $ directory ) ) { return $ this -> isEmpty ( $ directory ) ; } // remove children foreach ( $ files as $ file ) { $ this -> remove ( $ file , true ) ; } return $ this -> isEmpty ( $ directory ) ; }
Empty directory.

@see FtpClient::remove()
@see FtpClient::delete()
@see FtpClient::rmdir()

@param  string $directory
@return bool
Empty directory .