From 2c504c3d666a92d909210922079b1e8839abb61f Mon Sep 17 00:00:00 2001 From: Deon George Date: Fri, 6 Oct 2023 15:14:15 +1100 Subject: [PATCH] Include receive timestamp in packet:info and now using Storage::disk to find file --- app/Console/Commands/PacketInfo.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/app/Console/Commands/PacketInfo.php b/app/Console/Commands/PacketInfo.php index 40c94fc..96d0246 100644 --- a/app/Console/Commands/PacketInfo.php +++ b/app/Console/Commands/PacketInfo.php @@ -3,6 +3,7 @@ namespace App\Console\Commands; use Illuminate\Console\Command; +use Illuminate\Support\Facades\Storage; use App\Classes\File; use App\Classes\FTN\Packet; @@ -34,7 +35,10 @@ class PacketInfo extends Command */ public function handle() { - $f = new File($this->argument('file')); + $fs = Storage::disk(config('fido.local_disk')); + $rel_name = sprintf('%s/%s',config('fido.dir'),$this->argument('file')); + + $f = new File($fs->path($rel_name)); $a = $this->argument('ftn') ? Address::findFTN($this->argument('ftn')) : NULL; foreach ($f as $packet) { @@ -44,7 +48,7 @@ class PacketInfo extends Command $this->info(sprintf('Packet Type : %s (%s)',$pkt->type,get_class($pkt))); $this->info(sprintf('From : %s to %s',$pkt->fftn,$pkt->tftn)); - $this->info(sprintf('Dated : %s',$pkt->date)); + $this->info(sprintf('Dated : %s (%s)',$pkt->date,$pkt->date->timestamp)); $this->info(sprintf('Password : %s (%s)',$pkt->password,$pkt->password ? 'SET' : 'NOT set')); $this->info(sprintf('Messages : %d',$pkt->messages->count())); $this->info(sprintf('Tosser : %d (%s) version %s',$pkt->software->code,$pkt->software->name,$pkt->software_ver));