src/Net/FTP/Writer.php
public function removeFolder( $folderName )
	{
		$this->connection->checkConnection();
		$reader	= new Net_FTP_Reader( $this->connection );
		$list	= $reader->getList( $folderName );
		foreach( $list as $entry )
		{
			if( $entry['name'] != "." && $entry['name'] != ".." )
			{
				if( $entry['isdir'] )
					$this->removeFolder( $folderName."/".$entry['name'], TRUE );
				else
					$this->removeFile( $folderName."/".$entry['name'] );
			}
		}
		return @ftp_rmdir( $this->connection->getResource(), $folderName );
	}
public function removeFolder( $folderName )
	{
		$this->connection->checkConnection();
		$reader	= new Net_FTP_Reader( $this->connection );
		$list	= $reader->getList( $folderName );
		foreach( $list as $entry )
		{
			if( $entry['name'] != "." && $entry['name'] != ".." )
			{
				if( $entry['isdir'] )
					$this->removeFolder( $folderName."/".$entry['name'], TRUE );
				else
					$this->removeFile( $folderName."/".$entry['name'] );
			}
		}
		return @ftp_rmdir( $this->connection->getResource(), $folderName );
	}
public function removeFolder ( $ folderName ) { $ this -> connection -> checkConnection ( ) ; $ reader = new Net_FTP_Reader ( $ this -> connection ) ; $ list = $ reader -> getList ( $ folderName ) ; foreach ( $ list as $ entry ) { if ( $ entry [ 'name' ] != "." && $ entry [ 'name' ] != ".." ) { if ( $ entry [ 'isdir' ] ) $ this -> removeFolder ( $ folderName . "/" . $ entry [ 'name' ] , TRUE ) ; else $ this -> removeFile ( $ folderName . "/" . $ entry [ 'name' ] ) ; } } return @ ftp_rmdir ( $ this -> connection -> getResource ( ) , $ folderName ) ; }
Removes a Folder.
@access		public
@param		string		$folderName		Name of folder to be removed
@return		boolean
Removes a Folder .