public function deleteFile()
    {
        $retval = false;

        if (($nb_icontact_prospect = $this->getIContactProspect()) instanceof CNabuIContactProspect &&
            ($nb_icontact = $nb_icontact_prospect->getIContact()) instanceof CNabuIContact
        ) {
            $base_path = $nb_icontact->getBasePath();
            $filename = $base_path . DIRECTORY_SEPARATOR . $this->getFilename();

            if (file_exists($filename)) {
                unlink($filename);
                $retval = !file_exists($filename);
            }
        }

        return $retval;
    }
public function deleteFile()
    {
        $retval = false;

        if (($nb_icontact_prospect = $this->getIContactProspect()) instanceof CNabuIContactProspect &&
            ($nb_icontact = $nb_icontact_prospect->getIContact()) instanceof CNabuIContact
        ) {
            $base_path = $nb_icontact->getBasePath();
            $filename = $base_path . DIRECTORY_SEPARATOR . $this->getFilename();

            if (file_exists($filename)) {
                unlink($filename);
                $retval = !file_exists($filename);
            }
        }

        return $retval;
    }
public function deleteFile ( ) { $ retval = false ; if ( ( $ nb_icontact_prospect = $ this -> getIContactProspect ( ) ) instanceof CNabuIContactProspect && ( $ nb_icontact = $ nb_icontact_prospect -> getIContact ( ) ) instanceof CNabuIContact ) { $ base_path = $ nb_icontact -> getBasePath ( ) ; $ filename = $ base_path . DIRECTORY_SEPARATOR . $ this -> getFilename ( ) ; if ( file_exists ( $ filename ) ) { unlink ( $ filename ) ; $ retval = ! file_exists ( $ filename ) ; } } return $ retval ; }
Delete the file of this attachment from the iContact storage.
@return bool Returns true if success.
Delete the file of this attachment from the iContact storage .