futils.hpp File Reference

Basic file utility functions required by Exiv2. More...

#include "config.h"
#include "types.hpp"
#include <stdint.h>
#include <string>
#include <map>
#include <limits.h>


class  Exiv2::Uri
 A container for URL components. It also provides the method to parse a URL to get the protocol, host, path, port, querystring, username, password. More...


 Provides classes and functions to encode and decode Exif and Iptc data. The libexiv2 API consists of the objects of this namespace.


enum  Exiv2::EnVar { envHTTPPOST = 0, envTIMEOUT = 1 }
 the name of environmental variables.
enum  Exiv2::Protocol {
  pFile = 0, pHttp, pFtp, pHttps,
  pSftp, pSsh, pFileUri, pDataUri,
 the collection of protocols.


EXIV2API std::string Exiv2::getEnv (EnVar var)
 Return the value of environmental variable. More...
EXIV2API char Exiv2::to_hex (char code)
 Convert an integer value to its hex character. More...
EXIV2API char Exiv2::from_hex (char ch)
 Convert a hex character to its integer value. More...
EXIV2API char * Exiv2::urlencode (char *str)
 Encode the input url. More...
EXIV2API char * Exiv2::urldecode (const char *str)
 Decode the input url. More...
EXIV2API void Exiv2::urldecode (std::string &str)
 Like urlencode(char* str) but accept the input url in the std::string and modify it.
EXIV2API int Exiv2::base64encode (const void *data_buf, size_t dataLength, char *result, size_t resultSize)
 Encode in base64 the data in data_buf and put the resulting string in result. More...
EXIV2API long Exiv2::base64decode (const char *in, char *out, size_t out_size)
 Decode base64 data and put the resulting string in out. More...
EXIV2API Protocol Exiv2::fileProtocol (const std::string &path)
 Return the protocol of the path. More...
EXIV2API bool Exiv2::fileExists (const std::string &path, bool ct=false)
 Test if a file exists. More...
EXIV2API std::string Exiv2::pathOfFileUrl (const std::string &url)
 Get the path of file URL. More...
EXIV2API std::string Exiv2::strError ()
 Return a system error message and the error code (errno). See strerror(3).

Detailed Description

Basic file utility functions required by Exiv2.

Andreas Huggel (ahu) ahuggel@gmx.net
12-Dec-03, ahu: created
02-Apr-05, ahu: moved to Exiv2 namespace