public function saveExport($source, $filename) {
    $this->deleteExport($filename);

    if (!self::dirReady("{$this->path}/exports")) {
      throw new Exception("Unable to create directory for H5P export file.");
    }

    if (!copy($source, "{$this->path}/exports/{$filename}")) {
      throw new Exception("Unable to save H5P export file.");
    }
  }
public function saveExport($source, $filename) {
    $this->deleteExport($filename);

    if (!self::dirReady("{$this->path}/exports")) {
      throw new Exception("Unable to create directory for H5P export file.");
    }

    if (!copy($source, "{$this->path}/exports/{$filename}")) {
      throw new Exception("Unable to save H5P export file.");
    }
  }
public function saveExport ( $ source , $ filename ) { $ this -> deleteExport ( $ filename ) ; if ( ! self :: dirReady ( "{$this->path}/exports" ) ) { throw new Exception ( "Unable to create directory for H5P export file." ) ; } if ( ! copy ( $ source , "{$this->path}/exports/{$filename}" ) ) { throw new Exception ( "Unable to save H5P export file." ) ; } }
Save export in file system

@param string $source
Path on file system to temporary export file.
@param string $filename
Name of export file.
@throws Exception Unable to save the file
Save export in file system