src/Filesystem/Local.php
public function upload($key, UploadedFile $file, $overwrite = false)
    {
        $filePath = $this->getFilePath($key);
        if (file_exists($filePath) && !$overwrite) {
            throw new \RuntimeException(sprintf('The file with key "%s" is exists.', $key));
        }
        return $file->move(dirname($filePath), basename($filePath));
    }
public function upload($key, UploadedFile $file, $overwrite = false)
    {
        $filePath = $this->getFilePath($key);
        if (file_exists($filePath) && !$overwrite) {
            throw new \RuntimeException(sprintf('The file with key "%s" is exists.', $key));
        }
        return $file->move(dirname($filePath), basename($filePath));
    }
public function upload ( $ key , UploadedFile $ file , $ overwrite = false ) { $ filePath = $ this -> getFilePath ( $ key ) ; if ( file_exists ( $ filePath ) && ! $ overwrite ) { throw new \ RuntimeException ( sprintf ( 'The file with key "%s" is exists.' , $ key ) ) ; } return $ file -> move ( dirname ( $ filePath ) , basename ( $ filePath ) ) ; }
{@inheritdoc}
{