public function getPath(string $conversionName = ''): string
    {
        if (!$this->hasFile()) {
            throw  new Exception('Error getting path for media with no file');
        }

        $path = $this->getFile()->getPath();

        if ($conversionName) {
            $path = $this->getBasePath()
                . DIRECTORY_SEPARATOR . $conversionName
                . DIRECTORY_SEPARATOR . $this->getName();
        }

        return $path;
    }
public function getPath(string $conversionName = ''): string
    {
        if (!$this->hasFile()) {
            throw  new Exception('Error getting path for media with no file');
        }

        $path = $this->getFile()->getPath();

        if ($conversionName) {
            $path = $this->getBasePath()
                . DIRECTORY_SEPARATOR . $conversionName
                . DIRECTORY_SEPARATOR . $this->getName();
        }

        return $path;
    }
public function getPath ( string $ conversionName = '' ) : string { if ( ! $ this -> hasFile ( ) ) { throw new Exception ( 'Error getting path for media with no file' ) ; } $ path = $ this -> getFile ( ) -> getPath ( ) ; if ( $ conversionName ) { $ path = $ this -> getBasePath ( ) . DIRECTORY_SEPARATOR . $ conversionName . DIRECTORY_SEPARATOR . $ this -> getName ( ) ; } return $ path ; }
Get the path to the original media file.

@param string $conversionName
@return string
@throws Exception
Get the path to the original media file .