20 #include "config_downloader.h"
39 if (!filename.empty()) {
40 if (filename[0] ==
'/' || filename[0] ==
'\\') {
52 _bio = BIO_new_file(filename.c_str(),
"rb");
58 _bio = BIO_new_connect((
char *)_server_name.c_str());
59 BIO_set_conn_int_port(_bio, &_port);
70 if (_bio != (BIO *)NULL) {
71 if (downloader_cat.is_debug() && !_server_name.empty()) {
72 downloader_cat.debug()
73 <<
"Dropping connection to " << _server_name <<
":" << _port <<
"\n";
81 #endif // HAVE_OPENSSL
string get_fullpath() const
Returns the entire filename: directory, basename, extension.
A container for a URL, e.g.
bool is_local() const
Returns true if the filename is local, e.g.
The name of a file, such as a texture file or an Egg file.
static string unquote(const string &source)
Reverses the operation of quote(): converts escaped characters of the form "%xx" to their ascii equiv...
int get_port() const
Returns the port number specified by the URL, or the default port if not specified.
string get_scheme() const
Returns the scheme specified by the URL, or empty string if no scheme is specified.
string to_os_specific() const
Converts the filename from our generic Unix-like convention (forward slashes starting with the root a...
string get_server() const
Returns the server name specified by the URL, if any.
string get_path() const
Returns the path specified by the URL, or "/" if no path is specified.
static Filename from_os_specific(const string &os_specific, Type type=T_general)
This named constructor returns a Panda-style filename (that is, using forward slashes, and no drive letter) based on the supplied filename string that describes a filename in the local system conventions (for instance, on Windows, it may use backslashes or begin with a drive letter and a colon).