Added sftp file service #1032

Merged
jothi merged 1 commits from ranjith-dev into master 2026-09-15 03:13:02 +00:00

View File

@@ -0,0 +1,35 @@
<?php
namespace App\Services;
use Illuminate\Support\Facades\Storage;
class SftpFileService
{
protected $disk;
public function __construct()
{
$this->disk = Storage::disk('ftp');
}
public function getFiles(): array
{
return $this->disk->files();
}
public function getFileContent(string $file): string
{
return $this->disk->get($file);
}
public function moveFile(string $file, string $destination): bool
{
return $this->disk->move($file, $destination);
}
// public function deleteFile(string $file): bool
// {
// return $this->disk->delete($file);
// }
}