local storage driver & some icon fixes (#187)

This commit is contained in:
Saeed Vaziry
2024-05-01 22:54:44 +02:00
committed by GitHub
parent f81d928c66
commit 9936958259
28 changed files with 334 additions and 439 deletions

View File

@ -0,0 +1,38 @@
<?php
namespace App\StorageProviders;
use App\Models\Server;
use App\SSH\Storage\Storage;
class Local extends AbstractStorageProvider
{
public function validationRules(): array
{
return [
'path' => 'required',
];
}
public function credentialData(array $input): array
{
return [
'path' => $input['path'],
];
}
public function connect(): bool
{
return true;
}
public function ssh(Server $server): Storage
{
return new \App\SSH\Storage\Local($server, $this->storageProvider);
}
public function delete(array $paths): void
{
//
}
}