![]() Server : Apache/2.4.62 (Unix) OpenSSL/1.0.2k-fips System : Linux server1.richineiserver.com 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64 User : fdshops ( 1003) PHP Version : 8.2.21 Disable Function : NONE Directory : /home/fdshops/public_html/vendor/arcanedev/log-viewer/src/Contracts/Utilities/ |
<?php declare(strict_types=1); namespace Arcanedev\LogViewer\Contracts\Utilities; use Arcanedev\LogViewer\Contracts\Patternable; /** * Interface Filesystem * * @author ARCANEDEV <arcanedev.maroc@gmail.com> */ interface Filesystem extends Patternable { /* ----------------------------------------------------------------- | Constants | ----------------------------------------------------------------- */ const PATTERN_PREFIX = 'laravel-'; const PATTERN_DATE = '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]'; const PATTERN_EXTENSION = '.log'; /* ----------------------------------------------------------------- | Getters & Setters | ----------------------------------------------------------------- */ /** * Get the files instance. * * @return \Illuminate\Filesystem\Filesystem */ public function getInstance(); /** * Set the log storage path. * * @param string $storagePath * * @return $this */ public function setPath($storagePath); /** * Set the log date pattern. * * @param string $datePattern * * @return $this */ public function setDatePattern($datePattern); /** * Set the log prefix pattern. * * @param string $prefixPattern * * @return $this */ public function setPrefixPattern($prefixPattern); /** * Set the log extension. * * @param string $extension * * @return $this */ public function setExtension($extension); /* ----------------------------------------------------------------- | Main Methods | ----------------------------------------------------------------- */ /** * Get all log files. * * @return array */ public function all(); /** * Get all valid log files. * * @return array */ public function logs(); /** * List the log files (Only dates). * * @param bool $withPaths * * @return array */ public function dates($withPaths = false); /** * Read the log. * * @param string $date * * @return string * * @throws \Arcanedev\LogViewer\Exceptions\FilesystemException */ public function read($date); /** * Delete the log. * * @param string $date * * @return bool * * @throws \Arcanedev\LogViewer\Exceptions\FilesystemException */ public function delete(string $date); /** * Clear the log files. * * @return bool */ public function clear(); /** * Get the log file path. * * @param string $date * * @return string */ public function path($date); }