Constructs the file storage using a "dsn-like" path.
Example : "file:/path/to/the/storage/folder"
string $dsn The DSN:
\RuntimeException
public function __construct($dsn) {
if (0 !== strpos($dsn, 'file:')) {
throw new \RuntimeException(sprintf('Please check your configuration. You are trying to use FileStorage with an invalid dsn "%s". The expected format is "file:/path/to/the/storage/folder".', $dsn));
}
$this->folder = substr($dsn, 5);
if (!is_dir($this->folder)) {
mkdir($this->folder, 0777, true);
}
}