Home |All Classes |Grouped Classes |Index |Search

Function make_relative

Converts an absolute path into a path relative to a base path.

	static CL_String CL_PathHelp::make_relative(
		const CL_String & base_path,
		const CL_String & absolute_path,
		PathType  path_type = path_type_file);

Detailed description:

This function is the inverse of CL_FileHelp::make_absolute. Please see the detailed information for make_absolute for more information about behavior. This function calls normalise() on the base_path and absolute_path Example #1 (Windows): CL_String str = CL_PathHelp::make_relative ("ABD/DEF/", "c:\user\ABD\Filename.txt", CL_PathHelp::path_type_file ); On Windows: str = "..\Filename.txt" param: base_path = The base path (Does not require a trailing slash) param: absolute_path = The absolute path param: path_type = The path type