/**
  * @inheritdoc
  */
 public function init()
 {
     parent::init();
     if (!isset($this->modelClass)) {
         $this->modelClass = File::className();
     }
     $this->initStorages();
 }
 /**
  * @inheritDoc
  */
 public function getFileUrl(File $file)
 {
     $key = $this->prefix . '/' . $file->getFilePath();
     return $this->getAdapter()->getClient()->getObjectUrl($this->bucket, $key);
 }
 /**
  * Returns the file path for the file with the given name.
  *
  * @param string $filename file name.
  * @return string file path.
  */
 public function getFilePath(File $file)
 {
     return $this->getBasePath() . DIRECTORY_SEPARATOR . $file->getFilePath();
 }
 /**
  * @inheritDoc
  */
 public function fileExists(File $file)
 {
     return $this->filesystem->has($file->getFilePath());
 }