Main Page   Modules   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

relpath.cpp File Reference

#include <iostream>
#include <fstream>
#include <string>

Include dependency graph for relpath.cpp:

Include dependency graph

Functions

void clean_path (std::string &path)
std::string relative_path_clean (const std::string &path_from, const std::string &path_to, const std::string &path_stem)
std::string relative_path (std::string &path_from, std::string &path_to, std::string &path_stem)
int main (int argc, char **argv)

Variables

char usage []

Function Documentation

void clean_path std::string &    path
 

clean_path removes all ".." and "." elements in a path.

Parameters:
path  is the path being cleaned.

int main int    argc,
char **    argv
 

std::string relative_path std::string &    path_from,
std::string &    path_to,
std::string &    path_stem
 

std::string relative_path_clean const std::string &    path_from,
const std::string &    path_to,
const std::string &    path_stem
 


Variable Documentation

char usage[]
 

Initial value:

"Usage relpath <from_path> <to_path> <stem_path> [<append_file>]\n"
"relpath creates a relative path from an absolute path\n"
" <from_path> is the directory where the relative path is targetted for\n"
" <to_path> is the target path\n"
" <stem_path> is the minimum path to be considered for creating a relative path\n"
" <append_file> is an optional parameter, this file will contain a ';' separated list\n"
"\n"
"Example relpath /var/log/http/errors/ /var/log/http/nonerror/ /var/log\n"
"       results in '../nonerror'\n"

Generated for Austria by doxygen and MakeXS at Sun Oct 24 17:35:34 PDT 2004