Include receive timestamp in packet:info and now using Storage::disk to find file
This commit is contained in:
parent
df5cc8c2d4
commit
2c504c3d66
@ -3,6 +3,7 @@
|
|||||||
namespace App\Console\Commands;
|
namespace App\Console\Commands;
|
||||||
|
|
||||||
use Illuminate\Console\Command;
|
use Illuminate\Console\Command;
|
||||||
|
use Illuminate\Support\Facades\Storage;
|
||||||
|
|
||||||
use App\Classes\File;
|
use App\Classes\File;
|
||||||
use App\Classes\FTN\Packet;
|
use App\Classes\FTN\Packet;
|
||||||
@ -34,7 +35,10 @@ class PacketInfo extends Command
|
|||||||
*/
|
*/
|
||||||
public function handle()
|
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;
|
$a = $this->argument('ftn') ? Address::findFTN($this->argument('ftn')) : NULL;
|
||||||
|
|
||||||
foreach ($f as $packet) {
|
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('Packet Type : %s (%s)',$pkt->type,get_class($pkt)));
|
||||||
$this->info(sprintf('From : %s to %s',$pkt->fftn,$pkt->tftn));
|
$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('Password : %s (%s)',$pkt->password,$pkt->password ? 'SET' : 'NOT set'));
|
||||||
$this->info(sprintf('Messages : %d',$pkt->messages->count()));
|
$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));
|
$this->info(sprintf('Tosser : %d (%s) version %s',$pkt->software->code,$pkt->software->name,$pkt->software_ver));
|
||||||
|
Loading…
Reference in New Issue
Block a user