deletePluginData

The method $this->deletePluginData($filename) deletes a file associated with the current plugin.

  • @param: (string) $filename. The name of the file to delete.
  • @return: (bool) Returns true if the file is successfully deleted, otherwise returns false.

Example Usage

<?php

namespace Plugins\Myplugin;

use \Typemill\Plugin;

class Myplugin extends Plugin
{
    ...

    public function myFunction()
    {
        $this->deletePluginData('mydata.yaml');
    }
}