Set the path to the file
string $path Full path to the file:
self
InvalidArgumentException if the file cannot be read
Overrides PostFileInterface::setFilename
public function setFilename($filename) {
// Remove leading @ symbol
if (strpos($filename, '@') === 0) {
$filename = substr($filename, 1);
}
if (!is_readable($filename)) {
throw new InvalidArgumentException("Unable to open {$filename} for reading");
}
$this->filename = $filename;
return $this;
}