<?php
 namespace Modules\Utils\ExportData; class Ws_ConfirmFile_Request { public $fileName; public $fileSize; public function validate() { global $CFG; $queueContent = \App\ExportData\QueueManager::getInstance()->getFirstFiles(1); if (!$queueContent) { return false; } $fileName = reset($queueContent); if ($fileName!=$this->fileName) { return false; } $fileNameWithPath = $CFG['exportData']['queuePath'].$fileName; if (filesize($fileNameWithPath)!=$this->fileSize) { return false; } return true; } }