/** * Validate extension * @param FilesystemResource $resource * @return bool */ public function validateExtension(FilesystemResource $resource) { return pathinfo($resource->getPath(), PATHINFO_EXTENSION) === $this->getExtension(); }