Static Public Member Functions
vul_url Class Reference

Functions to test and open streams via a URL. More...

#include <vul_url.h>

List of all members.

Static Public Member Functions

static vcl_istream * open (const char *url, vcl_ios_openmode mode=vcl_ios_in)
 open a URL.
static bool exists (const char *url)
 Does that URL exist.
static bool is_url (const char *url)
 Is that a URL.
static bool is_file (const char *url)
 Is that a file.
static vcl_string encode_base64 (const vcl_string &in)
 Encode a string of chars into base64 format.
static vcl_string decode_base64 (const vcl_string &in)
 Decode a string of chars from base64 format.

Detailed Description

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

Definition at line 25 of file vul_url.h.


Member Function Documentation

vcl_string vul_url::decode_base64 ( const vcl_string &  in) [static]

Decode a string of chars from base64 format.

Definition at line 651 of file vul_url.cxx.

vcl_string vul_url::encode_base64 ( const vcl_string &  in) [static]

Encode a string of chars into base64 format.

Definition at line 572 of file vul_url.cxx.

bool vul_url::exists ( const char *  url) [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 471 of file vul_url.cxx.

bool vul_url::is_file ( const char *  url) [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 523 of file vul_url.cxx.

bool vul_url::is_url ( const char *  url) [static]

Is that a URL.

as opposed to an ordinary filename.

Definition at line 499 of file vul_url.cxx.

vcl_istream * vul_url::open ( const char *  url,
vcl_ios_openmode  mode = vcl_ios_in 
) [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 442 of file vul_url.cxx.


The documentation for this class was generated from the following files: