Eduardokum\LaravelBoleto\Cnab\Remessa\AbstractRemessa::save PHP Method

save() public method

Salva o arquivo no path informado
public save ( $path ) : mixed
$path
return mixed
    public function save($path)
    {
        $folder = dirname($path);
        if (!is_dir($folder)) {
            mkdir($folder, 0777, true);
        }
        if (!is_writable(dirname($path))) {
            throw new \Exception('Path ' . $folder . ' não possui permissao de escrita');
        }
        $string = $this->gerar();
        file_put_contents($path, $string);
        return $path;
    }