public function change_ext($ext, $file){
    if ( !empty($ext) &&
      !empty($file) &&
      file_exists($file)
    ){
      $pi = pathinfo($file);
      $new = $pi['dirname'].'/'.$pi['filename'].'.'.$ext;
      bbn\file\dir::move($file, $new, true);
      return [
        'file' => $new,
        'file_url' => $this->real_to_url($new)
      ];
    }
    $this->error("Error.");
  }