/**
  * Gets full path of a thumbnail file of a given type.
  *
  * @param string $thumb_type thumbnail type.
  * @param bool $create true = create thumbnail folder if it doesn't exists.
  * @return string thumbnail file path.
  */
 public function getThumbnailPath($thumb_type, $create = true)
 {
     $folder = $this->folder . self::getThumbnailFolder();
     if ($create && !file_exists($folder)) {
         $fs = new lyMediaFileSystem();
         $fs->mkdir($folder);
     }
     return $folder . DIRECTORY_SEPARATOR . $thumb_type . '_' . $this->file;
 }
 /**
  * preInsert.
  *
  * @param Doctrine_Event $event.
  */
 public function preInsert($event)
 {
     $this->updateRelativePath();
     $fs = new lyMediaFileSystem();
     $fs->mkdir($this->getRelativePath());
 }