Functions to test and open streams via a URL. More...
#include <vul_url.h>
Static Public Member Functions | |
| static std::istream * | open (const char *url, std::ios::openmode mode=std::ios::in) |
| open a URL. More... | |
| static bool | exists (const char *url) |
| Does that URL exist. More... | |
| static bool | is_url (const char *url) |
| Is that a URL. More... | |
| static bool | is_file (const char *url) |
| Is that a file. More... | |
| static std::string | encode_base64 (const std::string &in) |
| Encode a string of chars into base64 format. More... | |
| static std::string | decode_base64 (const std::string &in) |
| Decode a string of chars from base64 format. More... | |
Functions to test and open streams via a URL.
Currently supports file and HTTP only. HTTP support includes basic authentication, using the normal HTTP URL scheme, e.g. http://user4:mypassword@webserverthingy.org/file.txt
|
static |
Decode a string of chars from base64 format.
Definition at line 649 of file vul_url.cxx.
|
static |
Encode a string of chars into base64 format.
Definition at line 570 of file vul_url.cxx.
|
static |
Does that URL exist.
If the URL does not begin with a recognised scheme identifier, the function will treat the parameter as a local filename
Definition at line 465 of file vul_url.cxx.
|
static |
Is that a file.
i.e. is it a downloadable URL, or a file on disk that isn't a directory.
Definition at line 521 of file vul_url.cxx.
|
static |
|
static |
open a URL.
If URL is "file://..." open as a file with given mode. If URL is "http://..." open using vul_http_open If URL is "ftp://..." attempt ftp Otherwise assume it is a filename and open with given mode
Definition at line 436 of file vul_url.cxx.
1.8.15