public static function fromDirectory(string $directory): self
    {
        $exception = new self(\sprintf(
            'Directory "%s" does not exist.',
            $directory
        ));

        $exception->directory = $directory;

        return $exception;
    }