. */ namespace SP\Storage\File; /** * Interface FileStorageInterface * * @package SP\Storage\File; */ interface FileStorageInterface { /** * @param string $path * * @return mixed * @throws FileException */ public function load($path); /** * @param string $path * @param mixed $data * * @return FileStorageInterface * @throws FileException */ public function save($path, $data); /** * @param string $path * * @return mixed */ public function delete($path); /** * Returns whether the file is expired * * @param string $path * @param int $time * * @return bool */ public function isExpired($path, $time = 86400): bool; /** * Returns if the file is expired adding time to modification date * * @param string $path * @param int $date * * @return bool * @throws FileException */ public function isExpiredDate($path, $date): bool; }