Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions
zorba::filesystem_path Class Reference

#include <zorba/util/path.h>

Inheritance diagram for zorba::filesystem_path:
Inheritance graph
[legend]

List of all members.

Public Types

enum  flags_t { CONVERT_SLASHES = 1, RESOLVE = 2 }

Public Member Functions

filesystem_path branch_path () const
const char * c_str () const
 filesystem_path ()
 filesystem_path (const std::string &path_, int flags=0)
 filesystem_path (const filesystem_path &base, const filesystem_path &rel)
const std::string & get_path () const
bool is_complete () const
bool is_root () const
 operator const std::string & () const
filesystem_pathoperator= (const std::string &p_)
void resolve_relative ()

Static Public Member Functions

static const char * get_directory_separator ()
static const char * get_path_separator ()
static std::string normalize_path (std::string const &in, std::string const &base="")
 Utility function to normalize a path as a system conforming path and optionally resolve it.

Protected Member Functions

std::string getPathString () const

Member Enumeration Documentation

Enumerator:
CONVERT_SLASHES 
RESOLVE 

Definition at line 37 of file path.h.


Constructor & Destructor Documentation

zorba::filesystem_path::filesystem_path ( )
zorba::filesystem_path::filesystem_path ( const std::string &  path_,
int  flags = 0 
)
zorba::filesystem_path::filesystem_path ( const filesystem_path base,
const filesystem_path rel 
) [inline]

Definition at line 67 of file path.h.

References is_complete(), and get_path().


Member Function Documentation

filesystem_path zorba::filesystem_path::branch_path ( ) const
const char* zorba::filesystem_path::c_str ( ) const [inline]

Definition at line 80 of file path.h.

static const char* zorba::filesystem_path::get_directory_separator ( ) [static]
const std::string& zorba::filesystem_path::get_path ( ) const [inline]

Definition at line 79 of file path.h.

Referenced by filesystem_path(), and zorba::operator<<().

static const char* zorba::filesystem_path::get_path_separator ( ) [static]
std::string zorba::filesystem_path::getPathString ( ) const [protected]
bool zorba::filesystem_path::is_complete ( ) const

Referenced by filesystem_path().

bool zorba::filesystem_path::is_root ( ) const
static std::string zorba::filesystem_path::normalize_path ( std::string const &  in,
std::string const &  base = "" 
) [static]

Utility function to normalize a path as a system conforming path and optionally resolve it.

This function takes a path (as system path, file uri) and normalizes it. It converts file URIs to system paths and replaces '/' and '\' to the platform specific directory separator ('\' on Windows, '/' on UNIX like operating systems like Linux and Mac OS X). If the parameter base is set, it also resolves the path.

Parameters:
inThe path to normalize.
baseThe base name to resolve a path (default = ""), if this is the empty string, it does not resolve anything, but only normalizes the path.
Returns:
Returns a normalized and optionally a resolved path.
zorba::filesystem_path::operator const std::string & ( ) const [inline]

Definition at line 81 of file path.h.

filesystem_path& zorba::filesystem_path::operator= ( const std::string &  p_) [inline]

Definition at line 76 of file path.h.

void zorba::filesystem_path::resolve_relative ( )

The documentation for this class was generated from the following file:
blog comments powered by Disqus