use blade as conmmands template (#444)

* use blade as conmmands template

* fix lint

* fix ssl
This commit is contained in:
Saeed Vaziry
2025-01-27 21:27:58 +01:00
committed by GitHub
parent a73476c1dd
commit cdbde063f0
208 changed files with 1080 additions and 1012 deletions

View File

@ -2,16 +2,17 @@
namespace App\SSH\Storage;
use App\SSH\HasScripts;
use App\Exceptions\SSHError;
class FTP extends AbstractStorage
{
use HasScripts;
/**
* @throws SSHError
*/
public function upload(string $src, string $dest): array
{
$this->server->ssh()->exec(
$this->getScript('ftp/upload.sh', [
view('ssh.storage.ftp.upload', [
'src' => $src,
'dest' => $dest,
'host' => $this->storageProvider->credentials['host'],
@ -29,10 +30,13 @@ public function upload(string $src, string $dest): array
];
}
/**
* @throws SSHError
*/
public function download(string $src, string $dest): void
{
$this->server->ssh()->exec(
$this->getScript('ftp/download.sh', [
view('ssh.storage.ftp.download', [
'src' => $src,
'dest' => $dest,
'host' => $this->storageProvider->credentials['host'],
@ -46,10 +50,13 @@ public function download(string $src, string $dest): void
);
}
/**
* @throws SSHError
*/
public function delete(string $src): void
{
$this->server->ssh()->exec(
$this->getScript('ftp/delete-file.sh', [
view('ssh.storage.ftp.delete-file', [
'src' => $src,
'host' => $this->storageProvider->credentials['host'],
'port' => $this->storageProvider->credentials['port'],