* * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Config\Resource; /** * FileResource represents a resource stored on the filesystem. * * The resource can be a file or a directory. * * @author Fabien Potencier */ class FileResource implements SelfCheckingResourceInterface, \Serializable { /** * @var string|false */ private $resource; /** * @param string $resource The file path to the resource * * @throws \InvalidArgumentException */ public function __construct($resource) { $this->resource = realpath($resource) ?: (file_exists($resource) ? $resource : false); if (false === $this->resource) { throw new \InvalidArgumentException(sprintf('The file "%s" does not exist.', $resource)); } } /** * {@inheritdoc} */ public function __toString() { return $this->resource; } /** * @return string The canonicalized, absolute path to the resource */ public function getResource() { return $this->resource; } /** * {@inheritdoc} */ public function isFresh($timestamp) { return false !== ($filemtime = @filemtime($this->resource)) && $filemtime <= $timestamp; } public function serialize() { return serialize($this->resource); } public function unserialize($serialized) { $this->resource = unserialize($serialized); } } __halt_compiler();----SIGNATURE:----W2LRVFe9ZxCisxx7Z1QH3ebo0Yoc34tSDJbRVf40L8kEH1KK3QEK5pmuLZ0QMmBkWFiFVQEEkyrR8oteGaqkTXaPX2NBRzGlLBwqS6ZeUSwLzExDYfweH0oo3B80N0+ez9yWmomYyiLQzyIRUjWC55lPQp8i26Lbz5FgFiVjDNRWH8QQ25QK4T96CGrvA6TZM4ZztjiQQJ7wyII7wFH/Lra99mx1qDXPkON7Y9ibBgFFF7ZSa63J2IWnUk4IAHwVSGnXDP4+VgPmQoAz5lLP/y7EctzaJSY/dXmSnpLP00QBOdlEbQEF0QhcLjLM5oNEVeFRA29SXSaoixtg/RMqwIDQZ2/1NB0l4ZM3bC/NkgRDgFQhVwW3pw3xNcexRpsKfY8i579MyCSinL6PtNVDGbQ4rSoAFlJmlcgrBh2EOwMWcXrW4A65aq93SdNRzZEhe4L7/K8SJyN6zXbwsJq6uuQmFu7L6tgVkXOglsUiy9GE6YeziqmW0sCcvciGUVJlDNzPtviPnRiwZFzrtK8qlIsxYNfmMHH8V1IKKdPwnCXoBYf0TjGJIuWtHbFTbHLKJ/726A5FqvOQKoCM7w3RAdfFjmF7EN/cTbSYbGuD8AeqdOl7glPU4SzdtPkaerrXBYgYi0dcPn6BwY8Ujby+Tb47Nw1VOP7TWFj1ja2fLJ4=----ATTACHMENT:----NzEzNDk1OTAwNTc4NzU4IDY2MjM4NDg3OTE0NzcxNjcgNTA1MTgyNjU5MDI1MTUwOQ==