File ManagerCurrent Directory: wp-content/plugins/backwpup/vendor/inpsyde/backwpup-restore-shared/src/LogLinux appserver-0d5e4f1e-php-cc8da225320a42ba9b7d66cba40b1f03 6.6.123+ #1 SMP PREEMPT_DYNAMIC Wed Mar 11 09:04:28 UTC 2026 x86_64Edit File: FileReader.php <?php declare(strict_types=1); /* * This file is part of the BackWPup Restore Shared package. * * (c) Guido Scialfa <dev@guidoscialfa.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Inpsyde\Restore\Log; use Inpsyde\Assert\Assert; use InvalidArgumentException; use SplFileObject; /** * @internal * * @author Guido Scialfa <dev@guidoscialfa.com> */ class FileReader { /** * Read the Given File Line By Line. * * @throws InvalidArgumentException * * @return string[] */ public function lineByLine(SplFileObject $file): array { Assert::readable($file->getPathname()); $lines = []; $file->rewind(); while (!$file->eof()) { $logData = $file->fgets(); if ($logData !== false) { $lines[] = $logData; } } // Clean Lines $lines = array_map(static function (string $line): string { return preg_replace('~[\r\n]+~', '', $line) ?? ''; }, $lines); return array_filter($lines); } } Upload File Directory Listing NameTypeSizeActions.. (Parent Directory)DirFileReader.phpFile1.14 KB Rename | Delete | EditLevelExtractor.phpFile4.04 KB Rename | Delete | EditLevelExtractorFactory.phpFile762.00 B Rename | Delete | EditLog.phpFile636.00 B Rename | Delete | EditLogData.phpFile1.17 KB Rename | Delete | EditLogLineParser.phpFile1.13 KB Rename | Delete | EditNullLogData.phpFile719.00 B Rename | Delete | Edit